Let y= mx-2 be the tangent line to y=x^2-4x+2 at x=a.
Then slope,

Hence the equation is y=(2a-4)x-2
Let's find y-coordinate at x=a using tangent line and curve.
Using tangent line y at x=a is (2a-4) a -2

Using given curve y-coordinate at x=a is

Let's equate these 2 y-coordinates,



a=2 or -2.
If a=2,

If a=-2,

Hence m values are 0 and -8.