Welcome to PF!
You'll get better responses to your posts if you mark up the math properly using LaTeX. I've done that here for your equation: [itex]e^2=(mc^2)^2-(pc)^2[/itex]. To see how I did that, click on the ... button under my post.
Let's use units where c=1. Then the equation is [itex]e^2=m^2-p^2[/itex], which is simpler to work with.
How to prove it depends on what you're taking as postulates, and also on what facts you've already established.
If you've already established [itex]e=m\gamma[/itex] and [itex]p=m\gamma v[/itex] for massive particles, then the proof just involves simple algebra, plus taking the appropriate limit to cover the m=0 case.
If you take the work-kinetic energy theorem as a postulate (which I've never been satisfied with), then here is a derivation:
https://www.physicsforums.com/showthread.php?p=2416765