It's not easy for me (native speaker) to distill the general rule. But, empirically, bothas a matter of fact:
¿Cómo hacen todo?
and
¿Cómo lo hacen?
would be correct constructions, though itthey would be slightly different questions. In the second onelater, "lo", of course alludes to the thing that is being done ("todo" - direct object - you can try replacing it by "el trabajo"), which here is left tacit - so ittacit; hence, this would only make sense if the previous sentence or the context hashad mentioned it.that, eg: "-Siempre hacen todo de la misma manera. -¿Cómo lo hacen?"
So, your book/teacher is right.
To say
¿Cómo lo hacen todo?
would be a redundant construction (see that it's a merge of the two above). Not rightIncorrect, but it could pass onmight happen in casual speaking, perhaps for some emphasis.
¿Como todo lo hacen?
would be definitely wrong, that's notnever the order.