# Need help to complete the proof about change of probability

Got a question about change of probability. $P$ and $Q$ are two probability measures on the same space $(\Omega,\Lambda)$,and let $f=\dfrac{dQ}{dP}$ denote the Randon-Nikodym derivative of $Q$ respect to $P$. Show that

$$E_Q[X\mid\mathcal{G}]=\frac{E_P[Xf\mid\mathcal{G}]}{E_P[f\mid\mathcal{G}]}$$

I had no idea how to reach this conclusion.My logic is listed below

$$E_Q[X]=\int X\,dQ$$

$$E_P[Xf]=\int X\frac{dQ}{dP} \, dP=\int X\,dQ$$

which tells $E_Q[X\mid\mathcal{G}]=E_P[Xf\mid\mathcal{G}]$ which is consistent with the what need to prove above. Where did I go wrong? PLz help!!

Given $X$, the conditional expectation $\mathbb E^\mathbb Q[X\mid \mathcal G]$ is the $\mathcal G$-measurable function such that $$\int_A Xd\mathbb Q=\int_A E^\mathbb Q[X\mid \mathcal G]d\mathbb Q,\quad\forall A\in\mathcal G.$$
Hence, you must prove that $$\int_A Xd\mathbb Q=\int_A \frac{E^\mathbb P[Xf\mid \mathcal G]}{E^\mathbb P[f\mid \mathcal G]}d\mathbb Q,\quad\forall A\in\mathcal G.$$
Hint: If you define $\tilde{\mathbb P}=\left.\mathbb P\right|_\mathcal G$, is easy to show that $\mathbb E^\mathbb P[f\mid \mathcal G]=\dfrac{d\tilde{\mathbb P}}{d\tilde{\mathbb Q}}.$