@john t,
The Griffiths link was merely a trusted source for my claim that it's only a happy accident that ##E^2 = (mc^2)^2 + (pc)^2## works for massless things (see where he says, "Personally, I would regard this 'argument' as a joke...").
As for the algebra problem, we start with these two equations:
1) ##\, E = \dfrac{mc^2}{\sqrt{1 - \left( \frac{v}{c} \right)^2}}##
2) ##\, pc = \dfrac{mc^2 \left( \frac{v}{c} \right)}{\sqrt{1 - \left( \frac{v}{c} \right)^2}}##
First square Equation 1:
3) ##\, E^2 = \dfrac{(mc^2)^2}{1 - \left( \frac{v}{c} \right)^2}##
Then square Equation 2 and add ##(mc^2)^2## to both sides:
4) ##\, (pc)^2 + (mc^2)^2 = (mc^2)^2 \left( \dfrac{\left( \frac{v}{c} \right)^2}{1 - \left( \frac{v}{c} \right)^2} + \dfrac{1 - \left( \frac{v}{c} \right)^2}{1 - \left( \frac{v}{c} \right)^2} \right) = \dfrac{(mc^2)^2}{1 - \left( \frac{v}{c} \right)^2} = E^2##
QED.If you want to see how Equation 1 is derived (relativistic energy), study Einstein's original ##E=mc^2## paper (it makes use of the relativistic Doppler effect, which he'd derived a few months earlier in his first paper on special relativity):
https://www.fourmilab.ch/etexts/einstein/E_mc2/www/
In modern notation, the equation he ends up with is more or less this:
5) ##\, E_k = E_0 \left( \dfrac{1}{\sqrt{1 - \left( \frac{v}{c} \right)^2}} - 1 \right) ##,
where ##E_k## is kinetic energy and ##E_0## is rest energy (he uses the symbol ##E_0## for something else, so try not to get confused there). Then he does a binomial expansion to show that when ##v \ll c##, Equation 5 reduces to:
6) ##\, E_k = \dfrac{E_0 v^2}{2 c^2}##.
Comparing Equation 6 with the classical ##E_k = mv^2 / 2##, he obtains:
7) ##\, E_0 = mc^2##.
Since total energy ##E = E_0 + E_k##, we can easily get Equation 1 from Equations 5 and 7.Finally, if you want to see how Equation 2 is derived (relativistic momentum), read about the Tolman/Lewis thought experiment here:
https://books.google.com/books?id=FrgVDAAAQBAJ&pg=PA76