Is it valid to use operations on both sides before inequality is proven?

As Nelver's answer highlights, you've technically proven the converse of what we want (i.e. the opposite implication). That said, this is something that is done a lot of the time by many people and in some sense, it's a more natural approach, but you have to be careful about how you write it up. One thing you can do is to say that all of the steps you've taken are reversible.

The other way to write this, which is more common, is to use equivalences (if and only ifs). So you could write \begin{align*} \frac{ab}{a^2+b^2}<\frac{1}{2} \iff 2ab<a^2+b^2 \iff 0<(a-b)^2 \end{align*} which is true since $a\neq b$. The $\iff$ is saying that the statement holds if and only if the statement on the right holds.


What you've shown is $$\frac{ab}{a^2 + b^2} < \frac{1}{2} \implies 0 < (a-b)^2$$

But what you are (apparently) required to show is $$0 < (a-b)^2 \implies \frac{ab}{a^2 + b^2} < \frac{1}{2}$$

So the correct proof is basically the reverse of what you've written, namely:

Suppose $a ≠ b$. Then

$$\begin{align} 0 < (a-b)^2 &\implies 2ab < (a^2 + b^2)\\ & \implies\frac{ab}{(a^2)+(b^2)} <\frac{1}{2} \end{align}$$

$\square$


It is fundamentally correct, but not well phrased. Actually, using the basic rule:

Let $A,B,C,D$ be real numbers and suppose $B,D$ are positive, then

$\dfrac AB<\dfrac CD\;$ if and only if $\;AD<BC$.

In your case the hypotheses on the denominators are satisfied. We deduce instantly the chain of equivalences $$\frac{ab}{a^2 + b^2}< \frac{1}{2}\iff2ab <a^2+b^2\iff a^2+b^2-2ab=(a-b)^2> 0$$ which is true, except if $a=b$.