Can you please explain what formula I need to do to solve the following problem:

If 3 laps = 5/8 mile, how many laps needs to be completed to run 3 miles?

Don't look for "formulas" to do these kind of questions, use ratios, one of the most powerful tools of math

3 laps = 5/8 mile
x laps = 3 miles
so

3/x = (5/8)/3
cross-multiply
(5/8)x = 9
x = 9(8/5)
=14.4 laps