Hint $ $ scaling by $\:\!4\:\!$ yields $\ 3\:\!(2a + 1)^2 = (2 m-1) (2 m + 1)\,$ into coprime factors thus either
$(1)\ \, 2m\! -\! 1 = 3\:\!j^2,\,\ 2 m \!+\! 1 = k^2\, \Rightarrow\ \color{#c00}{k^2} = 3 j^2 + 2 \color{#c00}{\equiv 2}\pmod{\! 3}\ \Rightarrow\!\Leftarrow,\ $ or
$(2) \ \, 2 m \!-\! 1 = \ j^2,\,\ \ 2 m \!+\! 1 = 3 k^2 \Rightarrow {\rm odd}\ \color{#0af}{j =: 2\!\: i \!+\! 1}\,\Rightarrow\, m\, = {\large \frac{\color{#0af}{j^2}\,+\,1}2} =\, \bbox[5px,border:1px solid #c00]{(i+\!1)^2\! + i^2}$
Remark $ $ The above technique, exploiting the structure of coprime factors of powers in a UFD, is ubiquitous in number theory. Perhaps the simplest example is the parametrization of primitive Pythagorean triples $\ x^2 + y^2 = z^2.\,$ The essence of the proof is: $\ x+y\ i,\ x-y\ i\ $ are coprime factors of a square in the UFD $\,\Bbb Z[i]\,$ so they must themselves be squares (up to unit factors $\,i^n).\,$ Hence $\ x + y\ i\ =\ (m + n\ i)^2 =\ m^2 - n^2 + 2mn\,i.\,$ Similarly we can solve low degree cases of Fermat's Last Theorem by employing analogous factorizations over certain rings of algebraic integers. For example, Gauss showed there are no solutions for exponent $3$ by working in the ring of integers of $\ \mathbb Q(\sqrt{-3}),\,$ and Dirichlet did similarly for exponent $5$ using $\ \mathbb Q(\sqrt{5}).\,$ Later Kummer generalized these techniques to handle all regular prime exponents by working over rings of cyclotomic integers. For a nice exposition see Ribenboim: 13 lectures on Fermat's last theorem. Weil nicely summarizes the essence of these techniques (which generalizes Fermat's method of infinite descent) in his Number Theory, Ch.IV,S.VI,p.335,
(
