Download a Rom compatible to your phone to the sd card using the other phone, pop it in, boot to recovery, flash zip, restart, boom all set

Sent from my SGH-I727 using xda app-developers app