I am considering a system with initial pressure $P_{A}$ and volume $V_{A}$. The internal energy $U_{A}$ should be zero. Then I have the following law for an ideal mono atomic gas $P^{3}V^{5}=const$. Now if the system is expanding to a final volume of $V_{B}$ and pressure $P_{B}$. Then I can use the following relation $P_{A}^{3}V_{A}^{5}=P^{3}V^{5}$ to obtain a relation for the pressure depending on V: $$P(V)=P_{A}V_{A}^{5/3}V^{-5/3}$$ and $$U_{B}-U_{A}=-\int_{V_{A}}^{V_{B}}P(V)*dV=\frac{3}{2}P_{A}V_{A}\left [\left ( \frac{V_{A}}{V_{B}} \right )^{3/2} -1 \right].$$ and by setting $U_{A}=0$,
$$U_{B}=-\int_{V_{A}}^{V_{B}}P(V)*dV=\frac{3}{2}P_{A}V_{A}\left [\left ( \frac{V_{A}}{V_{B}} \right )^{3/2} -1 \right]$$.
What is if I expand the system to the same volume $V_{B}$ but with different pressures $P_{B}$ and $P_{B}^{*}$ then the energy of the final state would be the same independent of the final pressure. What am I missing here??