$ xRy$ iff $x^2 -y^2 = x-y$ is relation we have defined over $\mathbb{R} $
I have shown this is equivalence relation.
Now we have asked to find equivalence class of 3 which can be found out to be -2 and 3 .
Also next we need to find equivalence class of general x which turn out out to be 1-x. (Check this also)
So next question is given like $ xRy$ iff $f(x) = f(y)$ ; now I have to find all such function from $\mathbb{R} $ to $\mathbb{R} $. I stuck there any hint or help appreciated.
As noted in the comments, $f(t)=t^2-t$ is over such function. However, looking at the graph, what does it mean that $f(x)=f(y)$? It means exactly that $x$ and $y$ are equally far away from $\frac12$.
There are many other functions that do this. A full characterisation might be phrased along the lines of