Slope intercept form
y=mx+b
Where:
m= slope (cost per person)
b= y-intercept
people already aboard = 30
x= number of people
If x=30 y=180
if x=50 y= 220
180= 30m+b (1)
220= 50m+b (2)
Subtract (1) to (2)
40= 20m
40/20 = m
m= 2
It costs $2 per person.
SO far the equation is:
y= 2x+b
Plug a value of (x,y) and solve for b
For example, we use x=30 and y=180
180=2(30)+b
180 =60+b
180-60=b
120=b
Final equation:
y=2x+120