My Daughter's 4th grade math question got me thinking
Given a number of $3\!\text{ in}$ squares and $2\!\text{ in}$ squares, how many of each are needed to get a total area of $35 \! \text{ in}^2$?
Through quick trial and error (the method they wanted I believe) you find that you need $3$ $3\! \text{ in}$ squares and $2$ $2\! \text{ in}$ squares, but I got to thinking on how to solve this exactly.
You have 2 unknowns and the following info:$$4x + 9y = 35, \qquad x, y \in \mathbb{Z}^{\ge 0}.$$
It also follows then that $x \le 8$ and $y \le 3$.
I'm not sure how to use the inequalities or the integer only info to form a direct 2nd equation in order to solve the system of equations. How would you do this without trial and error?
A quick way to see the answer is to convert both sides of the equation mod 4. So the left hand side is y (mod 4) (because 4=0, 9=1 mod 4), and the right hand side is 3 (mod 4). So y=3 mod 4. Since $y\le 3$ as you observed, the only solution (if there is any ) is $y=3$. Then you check that $4x+27=35$ and hence $x=2$.