To use cases in odd and even is often a good start in excercises in number theory like this one. However in this case it is not necessary. Just use the definition for divisibility.
$d | a$ iff there is a number $k$ such that $dk = a$.
Using this we can conduct the following calculations
$$d|a \Leftrightarrow dk=a \Leftrightarrow dk*dk=a*a \Leftrightarrow d^2*k^2=a^2 $$
Thus if we let $k_0 =k^2$ we see that $d^2*k_0=a^2$ which, again by the definition of dividing implies that $d^2 | a^2$.
Regarding the consistency of your proof, It kinda proves (or at least stipulate) that $d^2$ is even and that $a$ is even... but why would this imply that $d^2 | a^2?$ it actually only prove that $2|a^2$.
Edit:
Indeed, this does only prove one of the directions. I'm sorry for that, I'll come back, however the second direction is much more elaborate, and I'm not sure how to do it without using a lot more theory...