I would recommend you to do these computations using four-vector algebra, not using the manipulations in the notes (that's very messy and you only have to make one mistake somewhere to get stuck). Let me explain a bit. You know that time and space transform according to Lorentz transformations. If you are at rest and I move relative to you in the x-direction with velocity v and we have synchronized or clocks t = t' = 0 when I was at x = 0 we have:
x' = gamma (x-vt)
t' = gamma (t - v x/c^2)
where x and t are the space time-coordinates of some event in your frame and x' and t' are the space time-coordinates of that same event in my frame. You can combine space and time in a four-vector like (ct,x,y,z). It turns out that you can also combine energy and momentum in a four-vector like (E/c, P). This then transforms under Lorentz transformations and we have:
P' = gamma (P - v E/c^2 )
E' = gamma (E - v P )
Here P and P' are just the x components of the momentum in your and my frame respectively.
In case of four vectors, one defines an inner product as follows. Let (a,b) and (r,s) be four-vector with a and r the "zeroth components (e.g. the time component of an event or the energy component of the energy-momentum four-vector), and let b and s be ordinary three-component vectors. Then one ...
A detailed solution is given.