Let $(\Omega,\mathscr{F})$ be a measurable space and $P$, $Q$ be two probability measures. Assume $Q$ is absolutely continuous with respect to $P$ and $\mathrm{d}Q/\mathrm{d}P=f$. I will use $E^P$ and $E^Q$ to denote the expectations with respect to $P$ and $Q$ respectively.
Assume $X$ is an integrable random variable and $\mathscr{G}\subset\mathscr{F}$ is a sub $\sigma$-algebra. Then I know the following equation $$E^Q(X|\mathscr{G})E^P(f|\mathscr{G})=E^P(Xf|\mathscr{G})$$ holds $Q$-almost surely.
Does this equation also hold $P$-almost surely?
Now I think the above equation also holds $P$ almost surely.
First of all, I think the statement $$E^Q(X|\mathscr{G})E^P(f|\mathscr{G})=E^P(Xf|\mathscr{G})\quad P-a.s.$$ should be understood in the following way:
"Let $\xi$ and $\eta$ be any versions of $E^Q(X|\mathscr{G})$ and $E^P(f|\mathscr{G})$ respectively. Then $\xi\eta$ is a version of $E^P(Xf|\mathscr{G})$."
Here is my proof. Because both $\xi$ and $\eta$ are $\mathscr{G}$-measurable, so is $\xi\eta$. Now consider any $A\in\mathscr{G}$. We want to show $$\int_A \xi\eta\mathrm{d}P=\int_A Xf\mathscr{d}P.$$ Notice $$\int_A \xi f\mathrm{d}P=\int_A\xi\mathrm{d}Q=\int_AX\mathrm{d}Q=\int_AXf\mathrm{d}P,$$ where the first and last equalities come from $\mathrm{d}Q/\mathrm{d}P=f$ and the second comes from the assumption that $\xi$ is a version of $E^Q(X|\mathscr{G})$. Hence we only need to show $$\int_A \xi\eta\mathrm{d}P=\int_A \xi f\mathrm{d}P.$$ This is true because $$\int_A \xi \eta\mathrm{d}P=\int_A E^P(\xi f|\mathscr{G})\mathrm{d}P=\int_A \xi f\mathrm{d}P,$$ completing the proof.
In many textbooks, this statement is left as an exercise and it is always written as $$E^Q(X|\mathscr{G})=\frac{E^P(Xf|\mathscr{G})}{E^P(f|\mathscr{G})}\quad Q-a.s.$$ I think the reason that we only get $Q$-a.s in this formula is due to the fact that $E^P(f|\mathscr{G})$ might be $0$, i.e., it is possible that $P(E^P(f|\mathscr{G})=0)>0$. However, it is easy to see $Q(E^P(f|\mathscr{G})=0)=0$.