There are believed to be about 100,000,000,000 to 400,000,000,000 stars in our galaxy.
That is a lot of stars to check. If it takes one second to check if a star is the Sun - and it might take a loot more time than that - you can check 60 stars per minute, 3,600 stars per hour, 86,400 stars per day, and about 31,557,600 stars per year. Thus you could check 315,576,000 stars in a decade, about 3,155,760,000 stars in a century, and about 31,557,600,000 stars in a millennium. Thus it would take about three thousand to twelve thousand years, to check every star in the galaxy at the rate of one star per second, which seems much too fast for me to believe.
When I was a child I read Rusty's Space Ship, by Evelyn Shibley Lampman, 1957. Two Earth children, Rusty and Susan, help a lizard like alien find his way back to his home at Eopee. They travel from planet to planet to planet in our solar system, trying to find Eopee. Finally the alien happens to sing in his sleep:
A messenger from Eopee
in Andromeda galaxy
my training is the very best
I passed with honors every test
And they wake him up and tell him what he sang in his sleep. So he takes them back to Earth and tells them he will be able to find his way back to Eopee now.
And a few years later, when I knew more about astronomy, I began to doubt whether the alien ever got back to Eopee. The Andromeda Galaxy is even bigger than the Milky Way Galaxy and has even more billions of star system. Unless the alien clearly remembered the directions back to Eopee, he would be forever trying to find a needle in a haystack searching for Eopee in the vast Andromeda Galaxy.
Go back to the beginning. How much knowledge of astronomy does someone need to tell if they are in the Milky Way Galaxy?
Maybe they will ask the aliens to show them pictures of the nearest galaxies. Maybe they will recognized images of the large and Small Magellanic Clouds and the Andromeda Galaxy M31 and the Triangulum Galaxy M33. And if the images are clearly taken from the same angles as telescopic images of them from Earth, then the aliens must be in the Milky Way Galaxy.
There is a theory that planets suitable for life have to exist in within a broad ring shaped area of the galactic disc of the Milky Way Galaxy, not too close or too far from the center of the galaxy. So once the aliens agree that you come from their galaxy, if they believe that theory then they will assume that Earth is within that ring shaped region of the galactic disc, eliminating tens or even hundreds of billions of stars, though tens or hundreds of billions of stars will be left.
If you can compare Earth spectral types of stars with the alien's system of classification, and if you know that Earth is a spectral type G0V or G2V star, and if you can find what type of stars those are in the classification of the aliens, you can eliminate maybe 90 or 95 percent of stars in the zone. And if you tell the aliens that our Sun is almost certainly a single star that should help the elimination.
If the aliens can deduce how much radiation Earth gets from the Sun from an examination of you, and if they can figure out what type of star the Sun is in their classification and thus its approximate absolute luminosity, they can estimate the length of Earth's year with a rough range in their timescale.
If you tell them that Earth astronomy books claim that the disc of the Milky Way is about 100,000 (Earth) light years in diameter and about 1,000 or 2,000 (Earth) light years thick near Earth, comparing those figures with their figures and with the approximate length of an Earth year and thus of an (Earth) light year compared to their units of measure, that will be helpful.
And doing so will be really helpful if you also remember that Earth is supposed to be about 25,000 to 28,000 (Earth) light years, from the super giant black hole at the center of the Milky Way Galaxy. That will enable the aliens to draw a ring around the super massive black hole in Milky Way Galaxy with a radius of their distance units that is equivalent to 25,000 to 28,000 light years. And then the aliens can draw an inner and an outer circle approximating the degree of uncertainty in those figures.
The ring of possible positions of Earth derived from the distance of Earth from the super giant black hole should be a much narrower ring than the ring deduced by the fact that there is life on Earth, so it should be very helpful to the aliens in narrowing down the field of search.
I note that as seen from Earth, The Andromeda and Triangulum galaxies are more than 90 degrees from the galactic center, while the Large and Small Magellanic Clouds are on the other side of the Galactic center and about 60 degrees from the galactic center. So if you can remember that, it would be a good indication which side of the galaxy Earth is in.
An Astronomical Unit (AU) is the average distance between Earth and the Sun. Astronomers measure the angle to a star at two times, six months apart, when Earth is on opposite sides of the Sun and is 2 AU apart. A distance of one parsec is the distance at which a separation of one AU would have an angle of only one arc second. A parsec is equal to about 3.26 light years or 206,264.806 AU.
Back in the 1830s, using a baseline of only 2 AU for their measurements, astronomers were able to measure the tiny six month changes in the positions of stars in the sky accurately enough to find the approximate parallaxes of three stars, and thus their distances from Earth. 61 Cygni is about 3.4947 parsecs, or 11.398 light years, or 720,833.59 AU from Earth, Alpha Centauri is about 1.340 parsecs, or 4.37 light years, or 276,363.5 AU from Earth, and Vega is about 7.68 parsecs, or 25.04 light years, or 1,584,113.6 AU, from Earth. And astronomers were able to measure their approximate distances with the instruments available in the 1830s.
And today Earth astronomers have much better instruments to measure tiny angles much more precisely and accurately. And some such instruments have been packed aboard the Gaia spacecraft.
Gaia is a space observatory of the European Space Agency (ESA), launched in 2013 and expected to operate until c. 2022. The spacecraft is designed for astrometry: measuring the positions, distances and motions of stars with unprecedented precision. The mission aims to construct by far the largest and most precise 3D space catalog ever made, totalling approximately 1 billion astronomical objects, mainly stars, but also planets, comets, asteroids and quasars among others.
If the aliens have the ability to send equivalents of the Gaia spacecraft, or much more advanced versions of it, through wormholes to any place in the galaxy, they can have pairs of those automated observatories observe a star from locations that are many light years or parsecs apart, and thus with baselines, tens, and hundred of thousands, and millions, of times as long as the baselines used by Earth bound astronomers, and they can measure the directions and distances to that star, and thus its position in three dimensional space, much more accurately than Earth bound astronomers. And they can do that for all of the billions of stars in our galaxy. And by measuring the apparent magnitude of a star at a specific distances, they can calculate its absolute magnitude, and thus calculate how bright it will appear from any point in the galaxy.
So the aliens will ask you about prominent constellations as seen from Earth. And with luck you should be able to draw not too bad depictions of a few, such as the Big Dipper and the little Dipper. And the most prominent Constellation, Orion. And by great good luck the distances to the stars in Orion which are brightest and most visible as seen from Earth happen to differ much less than the distances to the brightest stars in most constellations do. Thus Orion will be recognizable at a much greater range of distances than most Earth Constellations are.
And if you happen to remember that, as seen from Earth, Orion is almost opposite to the center of the Galaxy, the aliens should come up with a smart idea. If the aliens select points in the ring around the center of the galaxy where they think Earth should, be at one degree intervals as seen from the center of the galaxy, each point should be only about 440 to 490 light years from the next. And that should be close enough.
Then for each of those 360 points they can generate images of the sky as seen from that point, opposite to the center of the galaxy, with the apparent positions and the apparent magnitudes of the stars calculated. And at least one of those points should show a rather distorted image of Orion. And they they can calculate the appearance of the sky from a number of equally spaced points around that point, and find a point where Orion looks most like it is seen from Earth.
And then it will be helpful if you can remember the constellation of Taurus, which appears to the right of Orion from the northern hemisphere. Many of the brighter stars of Taurus form a sort of V shape and are in the Hyades star cluster about 153 light years from Earth. But a star along one side of the V, on the side toward Orion, is Aldebaran, which about 65 light years from Earth. Another star cluster, the Pleiades, about 450 light years from Earth, appears to be on the side of the Hyades away from Orion as seen from Earth.
So a spot where Taurus is recognizable is likely to be close to Earth.
So if the aliens can produce images of Taurus and Orion you recognize, they can send probes to study many star systems in that area of space to see if they are your solar system.
And I can't help wondering if someone with merely average high school knowledge of astronomy would be able to remember all the details which would help the aliens find Earth for them. I can't help thinking that if by chance they had a pocket book of astronomy on them when taken from Earth to the alien's world that would help the aliens a lot.
My answer to this question
discusses how someone with more astronomical information could find his location in space.