FWIW, I think this brings up a point I see all too often. The question may not have been clear, but really in a school setting students should be taught to always write out the formula/equation, show their work and carry units or perform "dimensional analysis"(I think that's what it was called back then). When using formulas, conversion factors, etc it is too common for people to start number crunching without really knowing what the end result should be. When a mistake is made with nothing written down and no units, it is impossible to go back and trace through.
Here is my take, both as a teacher and a student, about 'showing your work'.
I was blessed with at a young age the ability to do math in my head. It wasn't until I entered the advanced math program that I ever needed anything but. Even so, my 'work' was indecipherable notes with the rest being done with a slide rule and in my head. Forcing me to write down work I could easily do in my head was not teaching, it was a battle of egos. My teachers couldn't believe I could to the work in my head mostly because they couldn't.
I had teachers that would mark my correct answers wrong because there was no 'work' to look at, which did not fare well with my parents and the teacher got blasted by them during the PTA meetings because of that. In addition, I usually found faster, easier ways to come up with answers than the methods taught in class. I think what really pissed them off was the fact I could blast through a test in a couple minutes, get scores in the 90s, while the rest of the class labored for nearly the entire 50 minutes to complete the tests.
Once I got accused of cheating, specifically copying, because I showed absolutely no work at all on a test. When the ego battle ensued, the teacher could not tell me how it was possible to cheat and be the only one in the class with a perfect score.
I encourage my students to do math in their heads. If they are good at it, I see no point in forcing them to write stuff down. If they are not so good at it, I teach them how to estimate in their heads and jot down what they think is close. Then, at their option, I teach them to punch out the figures on a calculator with or without writing anything down. If the two answers are very close, there is a 90 percent the calculated answer will be correct. If they are way off, there is about a 50 percent chance the calculated answer is correct and it's time to re-think the problem before the answer is given.
So far, it's worked very well. I have a 'perfect score' in that, over an on and off period of six years, every student that completed my classes passed the FCC Technician Class Amateur Radio Operator exam on the first try.
Think about this: If you design a circuit and you screwed up something because you made a math error, would showing your work keep it from failing, perhaps catastrophically?
If 'showing the work' is a means that the student is comfortable with, certainly, that is the way it's done.
I also inform the students that are good in math that showing the work is a bit of an insurance policy as some teachers will give 'half credit' if they like the work they see, even if the answer is wrong. With no written work, wrong is wrong.
There is no set way to teach people math as each person has different fortes. It's best to be flexible with the focus on the answer, not the means during a test, and teach different approaches to the answer in the class.