Use the following general equation of a line which passes through the point (xo,yo):
y - yo = m(x - xo)
where m is the slope of the line and can be calculated by using the following formula:
![m=(y_2-y_1)/(x_2-x_1)](https://img.qammunity.org/2023/formulas/mathematics/high-school/78uaqhwt0aws3qfwxigaftpihnmb1gzxtp.png)
where (x1,y1) and (x2,y2) are any two points on the line.
Based on the given graph, you can use (x1,y1) = (0,0) and (x2,y2) = (1,4) to calculate the slope m:
![m=(4-0)/(1-0)=(4)/(1)=4](https://img.qammunity.org/2023/formulas/mathematics/college/gjoe719eifg308bml3vdhdafxz18g19kuf.png)
Now, replace (xo,yo) = (0,0) and m=4 into the general equation and solve for y:
y - 0 = 4(x - 0)
y = 4x
Hence, the cost y and the number of bags x can be related with the equation y = 4x