Solving system of nonlinear equations by substitution

I encountered this system of nonlinear equations: $$\begin{cases} x+xy^4=y+x^4y\\ x+xy^2=y+x^2y \end{cases}$$

My ultimate goal is to show that this has only solutions when $$x=y$$. I didn't find any straight forward method to solving this. But then I came up with the following solution.

First, if $$x=0$$, then clearly $$y=0$$ and for the solution we need to have $$x=y$$.

Then, assume that $$x\ne 0$$. Therefore there exists a real number $$t$$ s.t. $$y=t x$$. By substituting this to the equations, we find (by comparing the coefficients) that $$t=1$$ and therefore $$x=y$$.

Therefore the system has only solutions of form $$x=y$$, and every pair (x, y=x) is a solution.

So is this kind of method OK? If I checked the case $$x=0$$ separately?

The approach is fine, but since you did not show us your computations, I cannot tell you whether or not the full solution is correct.

Here's how I would do it. Note that\begin{align}x+xy^2=y+yx^2&\iff x-y=yx^2-xy^2\\&\iff x-y=xy(x-y)\end{align}and so if $$x\ne y$$, $$xy=1$$. But (still assuming that $$x\ne y$$)\begin{align}x+xy^4=y+yx^4&\iff x-y=xy(x^3-y^3)=xy(x-y)(x^2+xy+y^2)\\&\iff1=x^2+1+y^2\text{ (since xy=1 and x-y\ne0)}\\&\iff x^2+y^2=0\\&\iff x=y=0.\end{align}But we were assuming that $$x\ne y$$. So, there is no solution with $$x\ne y$$.

Square the equation $$x(1+y^2)=y(1+x^2)$$ and we have (Note that $$2x^2y^2$$ will cancel) $$\begin{eqnarray*} x^2(1+y^4)=y^2(1+x^4). \end{eqnarray*}$$ Now divide by the first equation and we have $$x=y$$.

Take the difference of the two equations and divide out common factors to get $$y^3-y=x^3-x$$. This is a cubic in either variable in terms of the other, giving three solutions in each case, possible duplicates (x=y will appear in both sets). Use synthetic division by $$x-y$$ to get quadratics in both cases to get remaining solutions.
Remaining solutions: $$x=\frac{-y\pm \sqrt{4-3y^2}}{2}$$ and $$y=\frac{-x\pm \sqrt{4-3x^2}}{2}$$
However these possible solutions do not in general satisfy the original equations, leaving $$x=y$$ as the only possible. An example: $$y=1$$ leads to $$x=0$$ and $$x=-1$$, which fail.