Given data:
The given points are (1,4) and (2,5) .
The given y-intercept is c=-2.
The equation of the slope of the line is,

The equation of the line is,

Substitute 1 for m, and -2 for c in the above equation.

Thus, the equation of the line is y=x-2.