I think both are important. One solution is to give credit for both the work (i.e. the process with which the student attempts to solve the problem) and the correct answer. This is because in real life the correct answer matters, and we should encourage students to be careful with their work to make sure it is correct. I would also encourage students to check their answer if it is simple (i.e. substitute 3 for x and see if the equation holds).