For this case we have that by definition, the equation of the line of the slope-intersection form is given by:

Where:
m: It is the slope of the line
b: It is the cut-off point with the y axis
We have the following points through which the line passes:

So the slope is:

Thus, the equation of the line is of the form:

We substitute one of the points and find "b":

Finally, the equation is:

Answer:

So here’s a example and formula
He bought 4 books.
3.95m + 8.95b = 47.65
If he bought 3 magazines, m =3
(3.95)3 +8.95b = 47.65
11.85 + 8.95b =47.65
now we subtract 11.85 from both sides
8.95b = 35.80
we divide both sides by 8.95
b=4
Hugh bought 4 books.
Because there is no solution if any number divide by 0