[guided]The weighted pairing differs from the Euclidean pairing only by the positive smooth factor $w$. The goal is to move that factor into the operator and then use the ordinary Euclidean adjoint.
Define $M_w:C_c^\infty(\varphi(U))\to C_c^\infty(\varphi(U))$ by $M_w f=w f$. Since $w$ is smooth and positive, multiplication by $w^{-1}$ is also a smooth multiplication operator. Let $A^\dagger$ be the formal adjoint of the localized operator $A$ with respect to the Euclidean measure $\mathcal{L}^n$, meaning
\begin{align*}
\int_{\varphi(U)} (Au)(x)\,\overline{g(x)}\,d\mathcal{L}^n(x)=\int_{\varphi(U)} u(x)\,\overline{(A^\dagger g)(x)}\,d\mathcal{L}^n(x)
\end{align*}
for all $u,g\in C_c^\infty(\varphi(U))$.
Now take $g=M_wv$. Because $w$ is real-valued and positive, $\overline{(M_wv)(x)}=w(x)\overline{v(x)}$. Hence
\begin{align*}
\int_{\varphi(U)} (Au)(x)\,\overline{v(x)}\,w(x)\,d\mathcal{L}^n(x)=\int_{\varphi(U)} (Au)(x)\,\overline{(M_wv)(x)}\,d\mathcal{L}^n(x).
\end{align*}
Applying the Euclidean adjoint identity to the right-hand side gives
\begin{align*}
\int_{\varphi(U)} (Au)(x)\,\overline{(M_wv)(x)}\,d\mathcal{L}^n(x)=\int_{\varphi(U)} u(x)\,\overline{(A^\dagger M_wv)(x)}\,d\mathcal{L}^n(x).
\end{align*}
To return to the weighted measure, insert $w(x)w(x)^{-1}=1$ inside the last integrand:
\begin{align*}
\int_{\varphi(U)} u(x)\,\overline{(A^\dagger M_wv)(x)}\,d\mathcal{L}^n(x)=\int_{\varphi(U)} u(x)\,\overline{(M_{w^{-1}}A^\dagger M_wv)(x)}\,w(x)\,d\mathcal{L}^n(x).
\end{align*}
Thus the weighted formal adjoint is precisely $M_{w^{-1}}A^\dagger M_w$. This formula is useful because multiplication by a smooth function has order $0$, so it can affect lower-order symbol terms but cannot change the top-order adjoint mechanism except through multiplication by its leading symbol.[/guided]