a)
$$\begin{align}&\int \tan^5 x \ dx=\int (\tan^2x)^2 \tan x \ dx=\\&\int (\sec^2x-1) \tan x \,dx\\&\\&u=\sec x \\&du=\sec x \tan x \,dx\\&\frac{du}{\sec x} =\tan x \,dx\\&\frac{du}{u} =\tan x \,dx\\&\\&\int \frac{(u^2-1)^2}{u} \,du=\int \frac{u^4-2u^2+1}{u} \,du\\&\\&\int u^3 - 2u + \frac{1}{u} \,du=\\&\frac{u^4}{4}-u^2+ \ln u +C=\\&\\&\frac{\sec^4 x }{4}-\sec^2 x+ \ln \sec x +C\\&\end{align}$$
b)
$$\begin{align}&\int \frac{1- \cot x}{\csc x} \,dx=\\&\int \frac{1}{\csc x}- \frac{\cot x}{\csc x} \,dx=\\&\int \sin x - \frac{\frac{\cos x}{\sin x}}{\frac{1}{\sin x}} \,dx=\\&\int \sin x - \cos x \,dx\\&= -\cos x - \sin x +C\end{align}$$