The change in internal energy of the system is given by the first law of thermodynamics:
[tex]\Delta U = Q-W[/tex]
where
Q is the heat added to the system
W is the work done by the system
In this problem, [tex]Q=-154 J[/tex] (with a negative sign because the heat is released by the system (not absorbed)), and the work is [tex]W=+125 J[/tex], with a positive sign since it is performed by the system. Therefore, the variation of internal energy of the system is
[tex]\Delta U = Q-W=(-154 J)-(+125 J)=-279 J[/tex]
So, the internal energy of the system has decreased.