Make x the subject in the relation y =x+2/x

as written, you have

y = x + 2/x
xy = x^2 + 2
x^2 - yx + 2 = 0
gives you two branches.

So, assuming the usual carelessness with parentheses,
y = (x+2)/x
xy = x+2
xy-x = 2
(y-2)x = 2
x = 2/(y-2)
NOT 2/y-2 !!