What is the value of $\arctan \left(\frac xy\right) +\arctan \left(\frac yx\right)?$
Yes it's a correct method.
As an alternative note that for $x>0$
$$\arctan x + \arctan \frac1x = \frac{\pi}2$$
indeed if you set
$$y=\arctan \frac1x$$
then
$$\tan y=\frac1x$$
that is
$$x=\cot y=\tan\left(\frac{\pi}{2}-y\right)$$
therefore
$$\arctan x=\arctan\tan\left(\frac{\pi}{2}-y\right)=\frac{\pi}{2}-y=\frac{\pi}{2}-\arctan \frac1x$$