Answer
$$-1$$
Work Step by Step
We have
$$
\lim _{x \rightarrow \frac{\pi}{2}} \left(x- \frac{\pi}{2}\right) \tan x=0\times\infty
$$
is an intermediate form, then we can apply L’Hôpital’s Rule as follows
$$\lim _{x \rightarrow \frac{\pi}{2}} \left(x- \frac{\pi}{2}\right) \tan x=\lim _{x \rightarrow \frac{\pi}{2}} \frac{x- \frac{\pi}{2}}{\cot x}=\lim _{x \rightarrow \frac{\pi}{2}} \frac{1}{-\csc^2 x}=-1.$$