Right-o!
See the diagram below.
The important lines are 3 and 6. Notice the divided rests on the back end of the beat in the correct versions vs. the non-divided in the incorrect versions. This is because the quarter note is the common division in 3/4 (as in the first line). Same principle applies in 12/8. The 8th is the common division (line 4) so they must be shown in the rests.