How can I make these pipes match up?

Just installed a new sink and ran into a hang up with the drain pipes. The pipe attached to the tee on the main drain is too long to attach to the p-trap. I’d really like to avoid cutting or messing with the tee/old pipe as it’s glued together. Is flex hose my only option? Any help is appreciated!