This one has pretty simple math in that this demo ignores momentum exchange - that is, speed is not defined at all here. The screenshots below show the derivation for when speed *is* involved, so to make my math match this demo, you have to limit u1 = u2 = 0.
Edit: This derivation of mine sucks. It's impenetrable. Just use the "q" equation at the bottom of ss1 and call it done.