equation of a line is y=mx+ c
where m is that gradient and c is y intercept
so first we find the gradient (m)
M= change in y intercept ÷change in x
M=4-2÷5-1
M=2÷4=1/2(as a fraction)(you can also use o.5)
there 1/2is the gradient
then to find the equation of the line
y= 1/2x +c (from coordinates 1,2 we substitute)
2=1/2(1)+c
2-1/2=c
c=1.5
or
from the coordinates 5,4
4=1/2(5) +c
4=5/2+ c
c=4-5/2
c=1.5
equation of the line=y=0.5x + 1.5
or y=1/2x +1.5
hope it helps you^_^