Total distance John drove=450 miles
total time=8 hours
let the number of hours he drove on highway be x, number of hours he drove on turnpike will be (8-x) hours
since
distance=speed*time
distance traveled in highway=50x
distance traveled in turnpike=60(8-x)
thus the total distance will be:
50x+60(8-x)=450
simplifying the above
50x+480-60x=450
-10x=450-480
-10x=-30
thus
x=3 hours
Thus he drove on highway for 3 hours.
Y=mx+c isn't an equation to solve. It's the slope-intercept formula for graphing lines.
y and x are the variables, and m and c are the constants.
As an example, the line y=4x+2 looks like this: