We break down 945 into prime factors = 3^3 * 5 * 7
a^2-b^2 = (a+b)*(a-b)
Comparing both sides of the equation we can divide 3^3*5*7 in two multiplicands and assing one to (a+b) and another to (a-b).
Then solve for a and b an obtain each time an ordered pair.
But we have to be sure than a and b are integers, not fractions.
(a+b) = k
(a-b) = l
a=(k+l)/2
b=(k-l)/2
a and b are integers if k and l are both odd of both even.
All the factors of 945 are odd, then the two multiplicands are odd and a and b are always integers.
factors of 945 = 4*2*2 = 16
But, for example, if the two multiplicands are 1 and 945, then -1 and -945 is a valid solution two. Add 16 more ordered pairs
16 + 16 = 32 ordered pairs
The correct answer is D