Prove that the output of a conditional statement (if then else) is always positive

I have this question, which I don't understand.

Let $x$ and $m$ be integer variables. The variable $m$ always holds a positive number after executing the following code: if (x > 10) {m = x - 7;} else {m = 5;}

Since it's assessed work, I do not want help. However, I've got a similar question in my notes. I was hoping if someone could explain to me how the similar question answer has been founded, I'll be able to apply the technique into my other question.

Here is the note for the similar question. It has the answer but I don't really understand how they got it.

So in the particular example 2, for case 1 the "assumption" is that $x<0$, and the output is then just given to be $y=10$ (which is greater than or equal to zero). And for case 2 the assumption is that it is false that $x<0$, so that in fact $x \ge 0$, and the output is then given as $y=x$, which is again greater than or equal to zero since in this "case 2" the value of $x$ is nonnegative by the case assumption.