The equation of a line is X+Y=1 and the equation of the function is y= 2/x +k. Solve for k and find the points on the tangent line

slope of line is -1

dy/dx for y = 2/x+ k is
-2/x^2

so -2/x^2 = -1
x^2= 2
x= ±2
if x = 2, 2+y = 1 ---> y = -1
so one point of contact is (2,-1)
it must lie on y = 2/x + k
-1 = 2/2 + k
k = -2

you try the case where x = -2