You run 0.5 miles every 3 minutes => 1 mile every 6 minutes.
Your friend runs 2 miles every 14 minutes => 1 mile every 7 minutes.
You run a whole number of miles every number of minutes that is a multiple of 6.
Your freind runs a whole number of miles every number of minutes that is a multiple of 7
Then the least possible number of miles that you both run to end at the same time is the least common factor of 7 and 6 minutes.
This is 7 * 6 = 42 minutes.
You will have run 42 min / (6 miles/min) = 7 miles, and your friend will have run 42 min / (7 miles/min) = 6 miles.