If a spell or ability is removed from the stack before it starts resolving, it does not resolve. Because Divide by Zero returns it to the owner's hand, they can cast it again later, or even immediately if they have enough mana.
April 30, 2021 7:21 p.m.
It might be easier to grok if you know what the zones are. Battlefield, hand, graveyard, exile, library, and stack are all different zones (also stuff like the command zone). This means if there's a spell on the stack and you return it to their hand, you have taken that spell off the stack because it can't be in two zones at once (the only exception being silver-bordered cards like Masterful Ninja ).
Ashiok's Erasure is similar, as you move the spell from the stack to exile. In either case, the card is no longer a spell on the stack, so it won't resolve or even try to.