What is adjoint bundle for trivial bundle? Let $P =M\times G\to M$ be a principal $G$-bundle on $M$(first coordinate projection)

What is $ad(P)$?

Here $ad(E) = E\times_{Ad}g$ is a vector bundle on $M$  [where $g$ = Lie$(G)$, $E$ is any principal $G$-bundle on $M$] . My expectation is that it is the trivial bundle on $M$.
Any element in $ad(P)$ is $[(m,g),v] \sim [(m,e).g,v] \sim [(m,e), Ad_{g}v]$. I need an isomorphism from $ad(P) \to M\times g$. Here $e$ is the identity element in $G$.
All spaces are smooth manifolds and groups are Lie groups.
Edit : I am adding the wiki link for adjoint bundle to avoid any confusion.
https://en.wikipedia.org/wiki/Adjoint_bundle
 A: Ok, you got everything right so far and your guess is spot on. We need an isomorphism between the vector bundles ${\rm Ad}(M\times G)\to M$ and $M\times\mathfrak{g}\to M$. Let's take $\Phi \colon M\times\mathfrak{g} \to {\rm Ad}(M\times G)$ given by $$\Phi(x,v) = (x,[(x,e),v]).$$The inverse will be $\Phi^{-1}\colon {\rm Ad}(M\times G) \to M\times \mathfrak{g}$ given by $$\Phi^{-1}(x,[(x,g),v]) = (x, {\rm Ad}(g)v).$$
Clearly $\Phi^{-1}$ is well defined, since by replacing $g$ with $gh$ and $v$ with ${\rm Ad}(h^{-1})v$ we have that ${\rm Ad}(gh){\rm Ad}(h^{-1})v = {\rm Ad}(g)v$. It should not be hard to see that they both act linearly on fibers.
Now, let's check that these maps are indeed inverses: $$\begin{align} \Phi\Phi^{-1}(x,[(x,g),v]) &= \Phi(x, {\rm Ad}(g)v) \\ &= (x,[(x,e), {\rm Ad}(g)v]) \\ &= (x, [(x,g),v]),\end{align}$$and $$\begin{align} \Phi^{-1}\Phi(x,v) &= \Phi^{-1}(x, [(x,e),v]) \\ &= (x, {\rm Ad}(e)v) \\ &= (x,v). \end{align}$$
In fact, there's nothing special about ${\rm Ad}$ and $\mathfrak{g}$ here, the same argument shows that if $M\times G \to M$ is the trivial principal $G$-bundle and $\rho\colon G \to {\rm GL}(V)$ is a representation of $G$ on a vector space $V$, then $\rho(M\times G) \cong M\times V$.
