Validity of proof by contradiction on the contrapositive? Given $a, b \in \mathbb{R},$ prove $ab = 0 \implies (a=0 \lor b=0).$
Is the following valid?

Proceed by contraposition. The contrapositive of $ab = 0 \implies (a=0 \lor b=0)$ is $(a \neq 0 \land  b \neq 0)  \implies ab \neq 0.$
Proceed by contradiction. Suppose $a \neq 0 \land  b \neq 0$ and, for contradiction, assume that $ab = 0.$ Taking $(ab = 0) \times \frac1a$ gives $b = 0$, which contradicts the supposition that $b \neq 0.$ Therefore $ab \neq 0,$ thus $(a \neq 0 \land  b \neq 0)  \implies ab \neq 0.$
Therefore, by contraposition, $ab = 0 \implies (a=0 \lor b=0).$
 A: Doing it as a proof by contradiction is completely unnecessary. You never use the assumption that $b\neq 0$ except to contradict your conclusion that $b=0$. In essence, you are doing a "fake proof by contradiction" of the contrapositive, by doing a contrapositive proof of the contrapositive. In fact, you are doing a direct proof in the first place!
Why do I say that? You start from $ab=0$. Then you say: "if $a\neq 0$, then multiplying by $\frac{1}{a}$ we conclude $b=0$"; fine up to here, but then you just use that conclusion to contradict your assumption that $b\neq 0$. Why bother? Just conclude that if $ab=0$ and $a\neq 0$ , then $b=0$...
And then you are done! Why? Because $P\vee Q$ is equivalent to $\neg P\implies Q$; so by proving that $\neg(a=0)\implies b=0$, you've actually proven that $(a=0)\vee (b=0)$... which is what you wanted to prove in the first place...
Or alternatively: assume $ab=0$. If $a=0$, you are done. If $a\neq 0$, then... and you put down your argument. So you've proven that either $a=0$ or $b=0$. No need for contrapositives, contradictions, or a double secret probation reversal...
A: Your proposed solution has a small internal error in the proof-by-contradiction portion: the negation of the contrapositive$$(a \neq 0 \land  b \neq 0)  \implies ab \neq 0,\tag{*}$$ is $$a \neq 0 \land  b \neq 0  \land ab=0,$$ which you use as your supposition; when the contradiction later surfaces via $b$ turning out to be $0,$ the correct deduction is then that $$(a \neq 0 \land  b \neq 0)  \implies ab \neq 0,\tag{*}$$ but not necessarily because $$ab\neq0.$$
In any case, as pointed out by Pavan, contraposition unnecessarily convolutes the proof; here's a shorter one (although, as pointed out by Arturo, a direct proof suffices and contradiction is unnecessary either):

*

*Let $a,b\in\mathbb R,$ suppose that $ab=0,$ and assume that $a,b\neq0.$
Then $a=\frac{ab}b=\frac0b=0;$ this is a contradiction; therefore, the assumption is false; i.e., $a=0 \lor b=0.$
Hence, for each  $a,b\in\mathbb R,\quad ab=0\implies(a=0 \lor b=0).$
