Teaser 2777: Summing up 2015

From The Sunday Times, 13th December 2015 [link]

I asked Harry and Tom to write down three numbers that between them used nine different digits and which added to 2015. They each succeeded and one of Harry’s three numbers was the same as one of Tom’s. I noticed that Harry’s three numbers included a perfect square and Tom’s included a higher perfect square.

What were those two squares?