The power is given by the work done per unit time. The work done for each bullet is the kinetic energy, which is given by:
\[
KE = \frac{1}{2} mv^2
\]
where \( m \) is the mass of the bullet and \( v \) is the velocity.
The mass of each bullet is \( 4 \, \text{g} = 0.004 \, \text{kg} \) and the velocity is \( 500 \, \text{m/s} \). Thus, the kinetic energy of each bullet is:
\[
KE = \frac{1}{2} \times 0.004 \times (500)^2 = 500000 \, \text{J}
\]
The total energy delivered by the machine gun in one minute (since 300 bullets are fired per minute) is:
\[
\text{Total energy} = 300 \times 500000 = 150000000 \, \text{J}
\]
The power is the energy delivered per second. Since there are 60 seconds in a minute, the power is:
\[
P = \frac{150000000}{60} = 2500000 \, \text{W} = 2.5 \, \text{kW}
\]
Thus, the power of the machine gun is \( 2.5 \, \text{kW} \).
Hence, the correct answer is option (4).