The film script makes it abundantly clear that they went to various destinations, including those that we see, as well as some that we don't.
In a romantic, picturesque MUSICAL MONTAGE we follow Aladdin
and Jasmine as the Carpet takes them on a magical tour.
The Carpet takes them down, amongst a herd of running horses.
Aladdin turns it into a race, urging the carpet ahead. Jasmine
cheers when they pull ahead of the lead horse--then strokes the
surprised horse's mane, waves 'bye-bye' to it.
They sweep past the pyramids, around the Sphinx. A worker is
startled by the Carpet; his hammer blow misses the chisel, and
the Sphinx's nose crumbles away.
They cruise past Grecian temples, over a still pond. The Carpet
whips quickly through the tree branches--creates a cascade of
falling blossoms. Then moves slowly through the cascade, near
to the water. Jasmine trails a hand on the surface; the Carpet
flies an intricate pattern--the wake left by Jasmine's trailing
hand makes a beautiful design.
The carpet follows the terrain of the land, rising up over a hill-- and before them is the Great Wall of China. They both look at it in shared wonder.
EXT. FORBIDDEN CITY - NIGHT
Aladdin and Jasmine are perched atop a building against a
background of twinkling stars. The Carpet sits away from them,
nearer to the roof's edge, dangling its feet, applauding the--FIREWORKS from a street festival. MUSIC can be heard.
Given the significant distances, thousands of miles, between these places, and utterly ignoring the anachronism involved, we can conclude that they traveled a magical route over a magical timescale.