The student bikes 12.35 miles from the corner store to school.
When heading back to the corner store, he gets a flat tire after having traveled only 5.21 miles.
He obviously is on his way back to the corner store. The distance he still needs to go is calculated as
12.35 miles - 5.21 miles = 7.14 miles
This means the student is 7.14 miles far from the corner store when the flat occurs.