Input are 24,22,0,2,4 rule is x=1/2x-2 what is output?

first of all, I am sure you meant y=1/2x-2

Secondly, is it
y=(1/2)x-2 ? , the way you typed it
or
y=1/(2x)-2 ?
or
y=1/(2x-2) ?

See how critical those brackets are ?