Let the first number of the five we are looking for equal n.
Because the numbers are consecutive, the next four can be expressed as (n+1), (n+2), (n+3) and (n+4).
Our series of 5 numbers is therefore n,(n+1),(n+2),(n+3),(n+4).
We are told the sum of the squares of the first 3 is equal to the sum of the squares of the last 2 therefore:
n² + (n+1)² + (n+2)² = (n+3)² + (n+4)²
expand all the brackets to give
n² + n² + 2n + 1 + n² + 4n + 4 = n² + 6n + 9 + n² + 8n + 16
3n²+6n+5 = 2n²+14n+25
n²-8n-20=0
factorising this gives us
(n+2)(n-10) = 0 so the solutions are n=10 and n=-2
That means that n,(n+1),(n+2),(n+3),(n+4) could be [-2, -1, 0, 1 and 2] or [10, 11, 12, 13 and 14].
Since the question asks for whole numbers, and negative numbers are not classed as whole numbers, the numbers we want must be 10, 11, 12, 13 and 14.
You can check this on a calculator by doing 10² + 11² + 12² (=365) and 13² + 14² (=365).