For processes involving liquids and solids, the work done due to volume change is often very small compared to the heat supplied, but it's not always negligible, especially when high precision is required as in this question's options. Always calculate both Q and W unless you are sure W can be ignored.