Writing the working first was the change that mattered. Step by step fixed 11 cases that zero-shot got wrong and broke 2 that it got right. Adding a working field before the answer in the JSON schema fixed 11 and broke 1, against the schema without it. A paired sign test, which only counts the cases that flipped, gives p = 0.02 and p = 0.006: unlikely to be luck.
Few-shot did not help here: 5 right, the same as zero-shot, with 2 cases fixed and 2 broken. My examples showed only the final number, so they taught the format, which zero-shot already followed, and not the arithmetic. Examples that show the working might do better; I did not test that, so I will not claim it. On a different task, a category label, examples did help a weaker model a lot, as my examples lesson shows. Which technique helps depends on what the model is getting wrong.
The JSON schema made every reply valid JSON, and still only 5 were right. A schema turns a reply your code cannot read into one it can read. It does not make the content correct. Two of the schema + working replies came back as a refund of 0: once with an empty working string, and once after the model decided that items which arrived fine are not refunded, even though the customer was sending them back. Your code still has to check the answer. My format lesson goes further into what a schema can and cannot promise.
One step-by-step reply was right but unusable: it ended with **Final Answer: 36** when I had asked for a line that starts with Answer:. A person would accept it. Code expecting the exact format would not. That is the case for putting the answer in a schema field rather than in free text.
The working is not free. Step by step wrote a median of 234 tokens per reply, against 3 for zero-shot, and took a median of 11.4 seconds on my laptop against 0.7. The schema with a working field got the same accuracy at 100 tokens and 5.1 seconds. On a paid API you pay for every one of those tokens. My step-by-step lesson prices the extra tokens per extra right answer.
Keep this in proportion. It is 20 cases, one small model, and one task that I wrote, so treat it as a demonstration of the method, not a ranking of techniques. Large reasoning models, which think before they answer on their own, behave differently: OpenAI's guide for them says to avoid asking for step-by-step thinking, because they already do it. Run your own loop on your own model.