That's making some assumptions about the pump efficiency, and likely that it is water that he is pumping.
HP = GPM x Ft. (head) x specific gravity of the fluid / 3960 x pump efficiency. So 400 x 150 (SG of water being 1) / 3960 = 15HP, so you must be assuming about a 60% efficiency to get to 25HP.
On the other one I get 30HP w/o eff, so same thing, at 60% eff it comes to 50HP.
Those are conservative number, good for estimating I suppose.
"Will work for salami"