Suppose that R is a ring with unity, $a, b \in R$ and that neither a nor b is a zero divisor. If ab unit, then a and b are units.
I know that a ring with unity means that
$$\exists 1_{R} \in R:\forall a \in R: 1_{R}a = a = a1_{R}.$$
For an element $a \in R$ to be a zero divisor we must have $a \neq 0_{R}$ and there must exist an element $\hat{a} \neq 0_{R}$ such that $a \hat{a} = 0_{R}$ or $\hat{a}a = 0_{R}$. Therefore, the meaning of not a zero divisor would be that given $a \neq 0_{R}$ we must have for every $\hat{a} \neq 0_{R}$ that $a\hat{a} \neq 0_{R}$ and $\hat{a}a \neq 0_{R}$. Similarly, for b we then have $b\hat{b} \neq 0_{R}$ and $\hat{b}b \neq 0_{R}$.
For $ab$ to be a unit there exists $(ab)^{-1} \in R$ such that $(ab)^{-1}ab = 1_{R} = ab(ab)^{-1}$.
Now, I have to show that $\exists a^{-1}, b^{-1} \in R$ such that $a^{-1}a = 1_{R} = aa^{-1}$ and $b^{-1}b = 1_{R} = bb^{-1}$.
I have no starting point thus far so any hint(s) are greatly appreciated.
You already have $a\underbrace{b(ab)^{-1}}_{a^{-1}?} = 1_R$. The question is, can we also show that $b(ab)^{-1}a = 1_R$ to satisfy the other condition for an inverse?
This is where the zero divisor condition comes in. Consider the following product: $$ab(ab)^{-1}a = 1_R a = a \implies ab(ab)^{-1}a - a = 0_R.$$ Then, we have $a(b(ab)^{-1}a - 1_R) = 0_R$. Since $a$ is not a zero divisor, we may conclude that $b(ab)^{-1}a - 1_R = 0$, which is what we need. Hence $a^{-1} = b(ab)^{-1}$.
A very similar method works to show that $b^{-1} = (ab)^{-1}a$.