Let $\rho_{AB}$ be the state of a composite quantum system with state space $H_A\otimes H_B$ (two finite dimensional Hilbert spaces). Now assume that $A$ and $B$ are isolated and suffer a unitary evolution given by $U_A$ and $U_B$. If we measure the system $A$ then the probability of observing $x$, one of the eigenvalues of the meassurement operator is:
\begin{equation} P(x)=tr((Pr_x\otimes I)(U_A\otimes U_B)\rho_{AB}(U_A^*\otimes U_B^*)) \end{equation} where $Pr_x$ is the projector on the eigenspace associated with $x$ and $I$ the identity on $H_B$.
I would like to prove that $P(x)$ is independent of the evolution of system $B$ and in particular follows: \begin{equation} P(x)=tr_A(Pr_xU_Atr_B(\rho_{AB})U_A^*) \end{equation} where $tr_A$ and $tr_B$ are the partial traces on systems $A$ and $B$. It is not exactly homework, it is just an unproven statement in a textbook.