Answer
See below for detailed work.
Work Step by Step
$$A=\int x^n\cos xdx$$
We set $u= x^n$ and $dv=\cos xdx$
That makes $du=nx^{n-1}dx$ and $v=\sin x$
Applying integration by parts $\int udv=uv-\int vdu$, we have
$$A=x^n\sin x-\int nx^{n-1}\sin xdx$$ $$A=x^n\sin x-n\int x^{n-1}\sin xdx$$
The reduction formula has been established.