x/n = y,
where x is the total of integers,
n is the number of integers,
y is their average,
then
(x+25) / (n+1) = (y+2)
(x+25+8) / (n+2) = (y+2-1)
substitute ny for x and we get ;
(ny+25)= (n+1)(y+2)
(ny+33)= (n+2)(y+1)
we now have two equations in two unknowns
solve first equation for y
ny+25 = ny+y+2n+2
y +2n = 23
y = 23-2n
reduce second equation and then substitute (23-2n ) for y
ny+33 = ny+2y+n+2
2y+n = 31
substitute for y
2(23-2n)+n = 31
46-4n+n = 31
-3n = -15
n = 5,
therefore
There are 5 numbers in the original list