Possible last digits of any square number :$$0,1,4,5,6,9$$
Possible combinations that can give perfect squares which end in $7$ are:$$(1,6)$$
Find the numbers whose squares are ending with $1,6$ and less than $2017$.
List of such numbers whose squares end in $1$ are : $1,9,11,19,21,29,31,39,41$. Check if any of the squares of these numbers when subtracted from $2017$, gives you a perfect square.
$$2017 - 1^2 = 2017 - 1 = 2016$$
$$2017 - 9^2 = 2017 - 81 = 1936 = 44^2$$
$$2017 - 11^2 = 2017 - 121 = 1896$$
$$....$$
$$2017 - 41^2 = 2017 - 1681 = 336$$
Find all the possible pairs, one such pair being $(9,44)$.After going through all the above mentioned cases, you can eventually conclude that $(9,44)$ is the only pair which satisfies the given condition.