Find all $f:\mathbb Q_{>0}\to \mathbb Q_{>0}$ such that $$f(x^2f(y)^2)=f(x)^2f(y)$$ This is from the IMO Shortlist 2018, and I just want to know if my solution is valid, here is the official solution
set $x=1/f(y)^2$ we get $$f\left(\frac{1}{f(y)^2}\right)= f\left(\frac{1}{f(y)^2}\right)^2 f(y)$$
We can cancel these two because of the domain and the range of the $f$, which means $$f \left(\frac{1}{f(y)^2} \right)= \frac{1}{f(y)} $$ $$f(t)=\sqrt{t}$$ but that doesn’t satisfy the range of the function and it’s not even a solution to the functional equation.
If we disregard the domain and range we see immediately that there are three trivial solutions
Of these, only the second satisfies the domain/range conditions.
So the only question is whether other solutions exist, since the original question asks for all solutions.
Your attempt does find another solution valid for domain/range $\mathbb{R}$ but not for $\mathbb{Q}_{>0}$ so it, too, must be discarded.
But this still does not rule out other possible solutions.
The official solution takes care of this by showing that the solution must be of the form $f(x)=C$ where $C$ is a positive rational number and that it must be the case that $C=1$.
So $f(x)=1$ is indeed the only solution.