Finding the largest linear combination that is not possible
First of all, there is a known formula that gives the correct answer in this case: if $a,b$ are relatively prime, then the maximal element which cannot be written as a non-negative combination of $a,b$ is $(a-1)(b-1)-1$. (Extending this to the case where $a,b$ are not relatively prime is a nice exercise.)

Second, suppose you don't know this formula, and want to prove that 47 is the largest value that cannot be generated. You have to prove two things:


47 cannot be generated.
Any larger number can be generated.


To show that 47 cannot be generated, note that if $47 = 9x + 7y$ with $x,y \geq 0$ then $x &lt; 7$ and $y &lt; 9$. This means that it suffices checking all $x \in \{0,\ldots,6\}$ and $y \in \{0,\ldots,8\}$.

To show that any larger number can be generated, you first show that $48,49,50,51,52,53,54$ can be generated, by giving the appropriate values of $x,y$ (for example, $48 = 3 \cdot 9 + 3 \cdot 7$). You then complete the proof by induction (how?).