Removing the top part is equivalent to adding to that top part a negative charge density that cancels out the charge there. The potential is then the sum of the potential from the original charge density and that of the negative charge density.
The negative charge density fills a rescaled version of the original pyramid, so to solve the problem you need to figure out how the potential behaves under a rescaling of the charge distribution.
The potential V(r) is, in general, given by:
V(r) = Integral rho(r')/|r-r'| d^3r'
Suppose we replace rho(r') by
rho(lambda r'). In this problem lambda would be equal to 5/2; t = lambda r' will range over the original pyramid The potential V' of the rescaled charge distribution is then:
V'(r) = 1/lambda^3 Integral rho(t)/|r-t/lambda| d^3t
If we introduce the variable
s = r lambda, this becomes:
1/lambda^2 Integral rho(t)/|s-t| d^3t
Now Integral rho(t)/|s-t| d^3t is the original potential at the point s = r lambda, so the potential due to the rescaled charge distribution is thus:
V'(r) = 1/lambda^2 V(lambda r)
So, the problem can be be solved as follows. We take the top to be at the origin r = 0. The potential due to the charge distribution is 1 V. Then the top part filled with the negative charge distribution is obtained by rescaling w.r.t. the origin by factor of lambda = 5/2.
Had we filled the whole pyramid with the negative charge distribution, that would have led to a potential of -1 V, therefore filling the top part with the negative charge distribution will lead to a contribution to the potential of
-(2/5)^2 V = -4/25 V
The total potential is thus 21/25 V
isnt it 17/25 ?