Almost. When heat flows from the system into the surroundings, the system loses heat and therefore q < 0. When work is done on the system, the system gains energy so w > 0. So the answer is:
ΔU = -883J + 365J = -518J
The signs can be tricky to figure out because they require thinking about what happens conceptually. When the problem states something always think whether this means that the system is losing energy (by either transfering heat away or doing work on the surroundings) or if it is gaining energy (by absorbing heat from the surroundings or by having the surroundings do work on the system).