For this I analyze what was need for this.
I looked for the average of humans (80.7kg), of assault rifles (3.99 kg), and of an average bullet (0.00454kg). I looked and estimated some of what was need for the velocity of each object, most almost not having much or any at all. If the shooter shot the railgun with no or minimal recoil, means that it didn't move him or changed his velocity which consisted of 0 m/s. If the bullet went at the speed of light then it's velocity would have been 299,792,458 m/s. The boyfriend stalker was falling to the ground so I estimated his speed at .46/m which is close to 3 mph. Using these I would find the momentum of the bullet and see where the energy carries on for both the shooter and for the stalker boyfriend.
After seeing the work, you should be able to tell the the energy from the railgun being shot, should have given a strong amount of recoil, that should have either sent the gun flying and maybe even the shooter too.
As for the boyfriend, he shouldn't have been pinned to the wall as he was. The bullet would have broken through the body and kept going. It is quite possible that it could have vaporized the body, leaving a giant hole, or maybe even nothing at all. The body would have also gone farther in distance compared to the distance he flew from where he was to a wall that was about maybe 3 meters away.
Seeing the analysis, the movie defies Physics and isn't accurate to an actual railgun that in this current day can only shoot bullets at the speed of 2500 m/s. The only real railgun that we've seen was the one from the Navy, which shoots aluminum rounds that are the size of about 70 mm rounds (guess/estimate).