Hey there!!
What is slope-intercept form ?
Ans :- y = mx + b
Where ' m ' is the slope and ' b ' is the y-intercept.
Equation given :- y = kx + 2
Now, we know k is m or the slope and 2 y-intercept.
y-intercept can be given as a coordinate.
Hence, y - intercept 2 can be written as ( 0 , 2 )
Now we have 2 coordinates, ( 0 , 2 ) and ( -7 , 12 )
How do we find slopes ?
Ans :- Slope =

Plugging in the values :
Slope =

Slope =

Hence, the value of 'k' is

Hope my answer helps!