Start by writing
$$z=tan(\theta)$$
So, for tan$(\theta)=2019$, $\theta$ will lie somewhere in between $\pi /4$ and $\pi/2$.
Now the second term will become
$$=2arctan(tan(\theta))=2\theta$$
This is allowed as $\theta$ falls within the range of arctan$(x)$
Now taking the first term
$$=arcsin\left(\frac{2tan(\theta)}{1+tan^2(\theta)}\right)$$
$$=arcsin\left(2sin(\theta)cos(\theta)\right)=arcsin\left(sin(2\theta)\right)$$
Since $\pi/4\lt\theta \lt \pi/2$,
$\pi/2\lt2\theta \lt \pi$
This falls outside the range of arcsin$(x)$
Now by symmetry around $\pi/2$ you can see that for it to come back within the range, for such $x$ we use $\pi - x$
Therefore
$$arcsin\left(sin(2\theta)\right)=\pi - 2\theta$$
Adding the first and second terms together
$$=\pi - 2\theta + 2\theta = \pi$$
I am attaching a link for more explanation
$\arcsin(\sin x)$ explanation?