To get the answer of 140 you must mean positive integers rather than non-negative. If you really mean non-negative the analysis would be similar but use $\geq$ and $\leq$ rather than $>$ and $<$.
A solution to $5x+7y=1$ is (-4,3) so a solution to $5x+7y=c$ is (-4c,3c) so the general solution is $(-4c+7n,-3c+5n)$. We want positive solutions so we need $-4c+7n>0$ and $-3c+5n>0$ or in other words:
$$\frac{4c}{7}<n<\frac{3c}{5}$$
For the largest c such as we get only 3 solutions consider what is required to get 4 solutions:
$$\frac{4c}{7}<n<n_2<n_3<n_4<\frac{3c}{5}$$
For only 4 solutions these will be sequential. I.e. $n_4=n+3$
$$\frac{4c}{7}<n<\frac{3c}{5}-3$$
So we want to find the largest $c$ which doesn't have unique integer solution to the inequality (as we don't want to get 4 solutions).
For no unique solution and maximal $c$ we want the two sides of the inequality to be consecutive integers.
$$\frac{4c}{7}=\frac{3c}{5}-3-1$$
$$20c=21c-140$$
$$c=140$$