Artificial intelligent assistant

Is there a rigorous approach to solving this, instead of trial and error? This is a question from a 4th grade math book. The solution in the teacher's guide suggests that one might not be able to model the question easily and the best approach may be to solve by trial and error. Indeed, by trial and error, the student found 7 to be a correct answer. But is that the only solution? Harriet bought some crackers for her favorite birds. She wanted to give each of them the same number of crackers. If she gave each bird 5 crackers, she would have 3 left. If she gave each bird 6 crackers, she would be short 4 crackers. How many favorite birds does she have? Is there any algebra that would help solve this type of problem instead of solving by trial and error?

If $c$ is the number of crackers, and $b$ is the number of birds, $$\left.\begin{align*} c&=5b+3\\\ c&=6b-4 \end{align*}\right\\}\implies5b+3=6b-4\implies 3+4=6b-5b\implies b=7$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e37160654c66ea8eed12e6f5852f52d9