You can put this solution on YOUR website! Find slope of line AB. Call this value M.
Now find .
Use point-slope form for a line and with point P(4,2) and the slope m, find the equation for the line which they define.
Use this equation with x=2 to find the value of k.
The point-slope form for a line is or alternatively ;
Do not confuse lower-case letters for variables with upper-case letters for variables.