We need to set up a system, rather than a single equation, because there are two variables involved.
The first equation represents the fact that the two numbers are in a 3:2 ratio:
The second equation represents the fact that their sum is 35:
So, we have the following system:
Using the expression for x in the first equation, the second one becomes
which implies