The initial potential energy of the arrow is,
The energy before it is shot is the total potential energy that is 800 J.
After the shot, as there is no energy loss due to friction, the total energy remains the same.
Total energy after the shot is 800 J.
During flight, the total energy will also be 800 J.
When it hits the target, the energy is not lost. The total energy remains the same as before, which means 800 J.
We here are applying the energy conservation principle.