As we know that
[tex]{\boxed{\sf Slope{}_{(m)}=\dfrac{y_2-y_1}{x_2-x_1}}}[/tex]
[tex]\LARGE\longrightarrow\sf -2={\dfrac {4+2}{k-2}}[/tex]
[tex]\LARGE\longrightarrow\sf -2={\dfrac {6}{k-2}}[/tex]
[tex]\LARGE\longrightarrow\sf 2 (k-2)=6 [/tex]
[tex]\LARGE\longrightarrow\sf 2k-4=6 [/tex]
[tex]\LARGE\longrightarrow\sf 2k=6+4 [/tex]
[tex]\LARGE\longrightarrow\sf 2k=10 [/tex]
[tex]\LARGE\longrightarrow\sf k={\dfrac {10}{2}}[/tex]
[tex]\LARGE\longrightarrow\sf k=5 [/tex]