The first equality is a bit tedious to derive but straight-forward. As commented by vanguard2k, the notation $N'(x)$ is meant to denote the density function of the standard normal distribution:
$$ N'(x) = n(x) := \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2}{2}} $$.
Simply insert the $d_{i}$ terms,
$$ d_1 = \frac{\log\left(\frac{S}{K}\right) + (r-q+\frac{1}{2}\sigma^2)(T-t)}{\sigma\sqrt{T-t}} $$
$$ d_2 = \frac{\log\left(\frac{S}{K}\right) + (r-q-\frac{1}{2}\sigma^2)(T-t)}{\sigma\sqrt{T-t}} $$
and rearrange.
The second equality cannot be, in general, correct. Simply write out the lhs to see that. Or note that the maximum of the standard normal pdf is slighlty less than 0.4. So for T>0.2, the equality is incorrect.