The currents (Amperes) in the two cases are calculated as power/voltage:
510000W / 12000V = 42.5 A
510000W / 47000V = 10.85 A
And that the power wasted in the two cases is calculated as current^2 x resistance:
(42.5 A)^2 (2.5 Ohms) = 4,515.625 W
(10.85 A)^2 (2.5 Ohms) = 294.30625 W
So the amount of power saved is the difference:
4,515.625 - 294.30625 = 4221.32 Watts
This is the main reason why distribution grids aim to operate at the highest voltages possible.