Prove that $\displaystyle \arctan x+\arctan y\equiv \arctan\frac{x+y}{1-xy}$.

use this relationship to show that, if $\displaystyle \arctan x+\arctan y+arctan z=\frac{\pi}{2}$ then $\displaystyle xy+yz+xz=1$

I have done the first part:

Let $\displaystyle \arctan x=\theta$ and $\displaystyle \arctan y=\phi$

then for LHS

$\displaystyle \equiv \theta +\phi$

$\displaystyle \equiv \arctan(\tan(\theta+\phi))$

$\displaystyle \equiv \arctan(\frac{tan \theta+\tan \phi}{1-\tan \theta \tan \phi})$

$\displaystyle \equiv \arctan(\frac{x+y}{1-xy})\equiv RHS$

now my problem is the second part, after i subsitute $\displaystyle \arctan(\frac{x+y}{1-xy})$ into $\displaystyle \arctan x+\arctan y+arctan z=\frac{\pi}{2}$ to get $\displaystyle \arctan(\frac{x+y}{1-xy})+\arctan z=\frac{\pi}{2}$, i don't know what to do.

Thanks