Slope formula: y1-y2/x1-x2=m, given that x and y are coordinates and m is the slope. You have two sets of coordinates in your question, so I will first use those to find the slope of the equation:
15-25/4-2=m
This reduces to -10/2, or -5.
Slope intercept form: y=mx+b, given m is the slope and b is the y-intercept. Plug the slope in now.
y=-5x+b
Now, use one of the coordinates in the question to solve for b. I'm using (4,15).
15=-5(4)+b
15=-20+b
Add 20 to both sides.
35=b
Your equation is: y=-5x+35
and b=35
I hope this helps :)