The LHS is a product of two squares, one even the other odd.
The RHS can be split into odd and even parts in two different
ways: 2b*(b + 1)orb*2(b + 1), so that four pairs of
equations are possible:
(1)a2 = 2b&(a + 1)2 = b + 1 givinga = 0 or -4,
(2)a2 = b&(a + 1)2 = 2(b + 1)givinga = 1,
(3)a2 = b + 1&(a + 1)2 = 2bgivinga = 3 or -1,
(4)a2 = 2(b + 1)&(a + 1)2 = bgivinga = -2.
a and b must be positive integers, so the only two
possibilities are those given in the question: