Maybe it wasn’t Dorothys quest that brought Zelena to the idea of the time travel spell, but the spell was the reason for Dorothys quest. Either Dorothy isn’t as good as we thought and wanted to change the past too or she wanted to stop Zelena from changing the past, so she tried to get back what Zelena would have needed.