I always got lost in remembering the rules for the signs, so I just ignore them and think about the two parts from the standpoint of the system (cylinder):
If heat enters the system, then it gets hotter so that contribution is positive. This part's fairly intuitive.
If I let the cylinder expand, it's relaxing to a less compressed state and so loses energy, which means the work contribution is negative. In order to compress the cylinder I have to push on it, adding some of my own energy to the system, so the work contribution is positive.
In your case, the change in energy from the heating (positive), and loss of energy through expansion (negative) is:
$$ \Delta E = 3600kJ - 800kJ $$
Edit: The problem itself is ambiguous regarding whether it's expansion of contraction. My answer assumes expansion since that's what would naturally happen upon heating a gas cylinder. Gaurang's answer is correct if you read it as contraction.