Expressions for distance and times only are given.
RT=D is Travel Rates Rule for constant rate.
I assume you wrote your "second traveled for..." incorrectly.
SPEED TIME DISTANCE
vehicle1 x+4
vehicle2 x+4
Same distance but different travel times - The speed of the vehicles are not the same. Do you want AVERAGE SPEED? Question does not tell.
All you can do is this:
SPEED TIME DISTANCE
vehicle1 (x+4)/(x^2-16) x^2-16 x+4
vehicle2 (x+4)/(2/(x-4)) 2/(x-4) x+4
Simplifiable to
SPEED TIME DISTANCE
vehicle1 x^2-16 x+4
vehicle2 2/(x-4) x+4