It probably helps if you notice that the unit quaternions are isomorphic to $SU(2)$, and the unit quaternions act as rotations on the quaternions by both left and right multiplication. So, we get a homomorphism
$$ p: SU(2) \times SU(2) \to SO(4) $$
It's easy to check that this is onto and that the kernel is $\pm (1,1)$. So, we get a double cover $p: SU(2) \times SU(2) \to SO(4)$, which therefore induces an isomorphism
$$ \pi_3(p) : \pi_3(SU(2) \times SU(2)) \to \pi_3(SO(4)) $$
Since $SU(2)$ is a 3-sphere, $\pi_3(SU(2)) \cong \mathbb{Z}$, so
$$ \pi_3(SO(4)) \cong \pi_3(SU(2) \times SU(2)) \cong \pi_3(SU(2)) \oplus \pi_3(SU(2)) \cong \mathbb{Z} \oplus \mathbb{Z} $$
But if you take the argument I gave and carefully follow all the details, you can get the explicit identification of $\pi_3(SO(4))$ with $\mathbb{Z} \oplus \mathbb{Z}$ described in the original question! For this it helps to notice that the map
$$ f_i : SU(2) \to SU(2) $$
given by
$$ f_i(u) = u^i $$
has degree $i$, so
$$ \pi_3(f_i) : \pi_3(SU(2)) \to \pi_3(SU(2)) $$
is multiplication by $i$.