question
Determine the non-zero digits $a, b, x$ so that $\overline{ab}^2 = \overline{xxb} $ and $\overline {ba} ^ 2 = \overline {bxx}$.
my idea
We can see that $10 \leq \overline{ab} \leq 31$ for $\overline{ab}^2$ to be a 3-digit number.
Also $\overline{ab}^2 = \overline{xxb} $ means that $b \in {1,5,6}$ because the last digit of the second member is b and the first member is $\overline{ab}^2$ and these are the only last digit that squared have the same digit.
From here we have only 7 possible cases: $11,15,16,21,25,26,31$
First of all, I want to ask you if my rationament is correct. Also, is there any way to shorten these cases?
Hope one of you can help me! Thank you!