Is it okay to reverse engineer proofs in homework questions? In a linear algebra text book, one homework question I received was:

Prove that $\mathbf{a \cdot b} = \frac{1}{4}(\|\mathbf{a + b}\|^2 -
 \|\mathbf{a - b}\|^2)$.

Where $\mathbf{a}$ and $\mathbf{b}$ are vectors in $\Bbb{R}^n$.
This is trivial to prove if we start from $\frac{1}{4}(\|\mathbf{a + b}\|^2 -
 \|\mathbf{a - b}\|^2)$ and reverse engineer it in $\Bbb{R}^2$:
$$
\|\mathbf{a + b}\|^2 = a_1^2 + 2a_1b_1 + b_1^2 + a_2^2 + 2a_2b_2 + b_2^2 \\
\|\mathbf{a - b}\|^2 = a_1^2 - 2a_1b_1 + b_1^2 + a_2^2 - 2a_2b_2 + b_2^2 \\
\|\mathbf{a + b}\|^2 - \|\mathbf{a - b}\|^2 = 4a_1b_1 + 4a_2b_2 \\
\frac{1}{4}(\|\mathbf{a + b}\|^2 - \|\mathbf{a - b}\|^2) = \frac{4}{4}(a_1b_1 + a_2b_2) \\
= a_1b_1 + a_2b_2 = \mathbf{a \cdot b}
$$
But I'm worried about whether or not proofs like this are "legal", if that makes any sense. There was no wording in the question stating that I couldn't start from the right side of the identity, but I still have this strange feeling of guilt that I should've tried solving the identity starting from the left side and working in the "normal" direction. 
For questions like these, is it okay to start from the right side of the identity? Would what I get out of doing the question in reverse be the same as if I did it normally?
 A: I don't know about "reverse engineering" in general, but I'd guess it's always fine: as anomaly commented, you can do anything that's logically justified.
In this case the answer is particularly clear, however.  Equality is a symmetric relation: $x = y$ means exactly the same thing as $y = x$.  A proof of one is the same as a proof of the other (with the addition of a step at the end where you use this symmetry property to flip the two sides, but usually there is no reason to write this because it will be obvious to the reader.)
I can imagine some situations where writing $x = y$ rather than $y = x$ might be better from a stylistic perspective, but style is usually less important that correctness when doing homework.
A: It's absolutely fine to reverse engineer proofs! As long as the proof works in the end, it doesn't matter how you got to it - in fact, reverse engineering proofs is a fairly standard technique.
However you need to be careful in this approach: you need to make sure that each step is reversible ($p$ implies $q$ does not mean $q$ implies $p$). With your example here though, we can easily reverse each step because everything is just equality. 
It is worth noting that although your proof method is fine, the proof itself doesn't quite get what you want because you have assumed that $a,b\in\mathbb{R^2}$ when you wish to prove for any two vectors $a,b\in\mathbb{R^n}$. This problem, though, is easily dealt with (can you see how?).
A: It is definitely a valid proof, as the other answers mention. 
One downside with a proof like this is that you are left wondering how you come up with the identity in the first place..
A: Personally, I'd suggest this approach of solution (which address the loss of generality by assuming $\mathbb{R^2}$:
$$4\mathbf{a}\cdot \mathbf{b} = [\mathbf{(a+b)\cdot(a+b)} - \mathbf{(a-b)\cdot(a-b)}]$$
which leads almost immediately to the required result.
A: Not only is it 'OK', it is equally as valid to go from the RHS to the LHS as it is to go from the LHS to the RHS.
Moreover, sometimes one finds that the best approach is to work from both ends simultaneously. 
As a student you may well find that the simultaneous approach is very useful in a exam situation.
Perhaps when fully written up, a single direction might be easier to follow, but the overwhelming concern is correctness.
Indeed, one thing that might impress a maths examiner beyond correctness is cleverness, which in maths usually means finding a trick or shortcut. From that viewpoint, being smart about thinking whether to from RHS to LHS rather than LHS to RHS is a good thing.
