Abis Mal uses a time machine to go back in time to avoid Jasmine's father to become the Sultan so he can be the Sultan of Agrabah. If he succeeds not only will Abis Mal be the Sultan, but Jasmine's will no longer exist.