In a two-digit number, the tens digit exceeds the units digit by $3$. The difference between twice the number with the digits reversed and the number itself is $42$. What is the number?
My solution: Let be $\boxed{x}\boxed y$ the number with two digits. $\boxed{x}\boxed y=10x+y$. The tens digit exceeds the units digit by $3$. Hence:
$$x=10\cdot (y+3)+y.$$
But $2\boxed{y}\boxed x-\boxed{x}\boxed y=42 \iff 20\cdot (y+3)+2y \ldots $.
I don't know how to set it up from the beginning. How should it be done?
You could call the digit of tens $a$ and the digit of units $b$. From the first condition you get $a=b+3$ and from the second $2(10b+a)-(10a+b)=42$. Solving you should get $a=9, b=6$.