Final answer:
The net change in internal energy of the system can be calculated by taking the sum of the heat transfer and the work done on the system, and subtracting the sum of the heat transfer and the work done by the system.
Step-by-step explanation:
The net change in internal energy of the system can be calculated by taking the sum of the heat transfer and the work done on the system, and subtracting the sum of the heat transfer and the work done by the system. In this case, the heat transfer to the system is 40 J and the work done by the system is 10 J, resulting in a positive change in internal energy. The heat transfer out of the system is 25 J and the work done on the system is 4 J, resulting in a negative change in internal energy.