y = 90 - 30x is the linear equation that represents your distance from the restaurant.
Solution:
Here, the function which represents the distance between my friend and restaurant,
y = -40x + 120
where x is the number of hours since your friend left home
Since, when he covered the whole distance y = 0
0 = -40x + 120
40x = 120
x = 3
Thus, he is taking 3 hours to covered the whole distance
And, According to question, me and my friend take the same time to covered the distance
Thus, the time taken by me to covered 90 miles = 3 hours
Therefore, speed is given by formula:
Thus my speed is 30 miles per hour
Distance of me at "x" hour is given by:
Thus, in x hour the distance between me and restaurant,
distance between me and restaurant at "x" hour = total distance - distance covered at "x" hour
y = 90 - 30x
Which is the required linear equation