can get as far as solving

BUT THEN THAT GODDAMN 0 COMES UP AND TRIES TO DIVIDE