Start by finding how long it takes each to run 1 mile.
You: 0.5 mile every 3 minutes => 1 mile every 6 minutes
Your friend 2 miles every 14 minutes => 1 mile every 7 minutes
Now you have to calculate the minimum common multiple of 6 and 7.
For that you need to factor both numbers and take common and non common factors raised to their highest exponent:
6 = 3*2
7 = 7
Then the minimum common multiple is 2*3*7=42.
Now divide the time 42 by the humber of minutes each of you take to run 1 mile
you: 42 minutes / 6 minutes per mile = 7 miles
your friend 42 minutes / 7 minutes per mile = 6 miles.
You can run 7 miles and your friend 6 miles in the same time.
Answer: 7 and 6