Gerry Myerson’s comment should take care of the first problem. The second one has to be misstated: I’ve very little doubt that it should be
$\lim_{x\to\left(\frac{\pi}2\right)^-}\frac{\tan x}{\ln\left(\frac{\pi}2-x\right)}\;.$
Corrected: If so, apply l’Hospital’s rule once and do a little simplification:
$\begin{align*} \lim_{x\to\left(\frac{\pi}2\right)^-}\frac{\tan x}{\ln\left(\frac{\pi}2-x\right)}&=\lim_{x\to\left(\frac{\pi}2\right)^-}\frac{\sec^2 x}{\frac{-1}{\frac{\pi}2-x}}\\\\ &=\lim_{x\to\left(\frac{\pi}2\right)^-}\sec^2 x\left(x-\frac{\pi}2\right)\\\\ &=\lim_{x\to\left(\frac{\pi}2\right)^-}\frac{x-\frac{\pi}2}{\cos^2 x}\;. \end{align*}$
Now apply l’Hospital’s rule one more time.