So I was looking through the homepage of Youtube to see if there were any math problems that I thought that I might be able to solve when I came across this number theory question by Cipher. The question was$$\text{A group of }41\text{ men, women, and children eat at an inn.}$$$$\text{The bill is for }40\text{ sous. Each man pays }4\text{ sous, women }3\text{ sous, and three children eat for a sou.}$$$$\text{How many men, women, and children ate?}$$which I thought that I might be able to solve. Here is my attempt at solving the aforementioned equation:$$4m+3w+\frac{1}{3}c=m+w+c-1$$$$12m+9w+c=3m+3w+3c-3$$$$9m+6w-2c+3=0$$which plugging this into Wolfram Alpha gets us$$c=3n_1$$$$m=2n_2+1$$$$w=n_1-3n_2-2$$Which is something that I can now plug into Desmos, which the reason I am unable to plug it into the original equation is because we get$$8n_2+4+3n_1-9n_2-6+n_1=2n_2+1+n_1-3n_2-2+3n_1$$$$\text{Which simplifies to }0=0$$So plugging the info into Desmos (sadly) we attain the solution$$n_1=11$$$$n_2=2$$Which means that there were $5$ men, $3$ women, and $33$ children.
$$\mathbf{\text{My question}}$$
Is the solution that I have achieved correct, or is there something that I would be able to do to attain the correct solution/attain it more easily?
$$\mathbf{\text{To clarify}}$$
The reason that I am using the tag "system-of-equations" is because we are solving for the equations where $m+w+c=41$ and $4m+3w+\frac{1}{3}c=40$
HINT.-$m+w+c=41$ and $4m+3w+\dfrac c3=40$ implies $11m+8w=79$ and this diophantine equation admets the particular solution $(m,w)=(5,3)$ for which the general solution is given by $$(m,w)=(5+8n,3-11n)$$The only solution in natural numbers is when $n=0$ Thus $\boxed{(m,w,c)=(5,3,33)}$