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: e^2=(mc^2)^2-(pc)^2. To see how I did that, click on the ... button under my post.
Let's use units where c=1. Then the equation is e^2=m^2-p^2, 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 e=m\gamma and p=m\gamma v 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