Having SB11 a mere 2 LYs from Talos when both are meant to be in distinct solar systems is just another example of DSC being horrible with interstellar distances IMO and shouldn't be taken too literally
If interstellar distances have a random distribution, most stars will have an average and typical distance to their nearest neighbors, while some will be much farther or closer than the average.
Think of all the millions of asteroids, counting pebble and dust size ones, in our solar system, all orbiting around the center of mass in the Sun. There are billions and billions of stars in our galaxy, all orbiting round the center of mass of the galaxy. And just as asteroids orbit the Sun and get nearer to and farther from each other, so to the billions of stars orbiting the center of the galaxy pass nearer to and farther from neaby strs on their own orbits. Every meterorite which lands on Earth is a tiny asteroid which got close enough to Earth to collide with it.
So at any one moment in time, some stars will be closer to their closest neighbors than other stars will be, and over thousands and millions of years every star will pass close to and then move away from a number of other stars.
This table -
https://en.wikipedia.org/wiki/List_of_nearest_stars_and_brown_dwarfs#Distant_future_and_past_encounters - lists stars calcaulated to pass within 8 light years of The Sun in the last five million years and in the next five million years, a mere ten million years in the four and a half billion years of tte Sun's past history. Note that six of them pass within two light years of the Sun. I guess that probably most stars in the galactic region of the Sun spend perhaps one percent of their time within two light years of another star.
So there is nothing weird about there being a few examples of stars only two light years apart in a large sample.of stars.
Fortunately the "six days" is easy to explain since the first log entry of
The Menagerie Part 1 does not appear until just before the trial begins, which we know lasts around a 24 hours (from
The Menagerie Part 2). Precisely what Kirk and crew and do were doing for the other 5 days is unknown, but attempting to wrestle control back from the ship's navi-computer is a fairly safe bet!
Spock says the voyage he mentioned to Pike offscreen will take six days at maximum warp. Spock stells the Eterprsie andd Kirk catches up and Spock is arrested. Later:
Captain's log, stardate 3012.4. Despite our best efforts to disengage computers, the Enterprise is still locked on a heading for the mysterious planet Talos Four. Meanwhile, as required by Starfleet General Orders, a preliminary hearing on Lieutenant Commander Spock is being convened. And in all the years of my service, this is the most painful moment I've ever faced.
And later:
Captain's log, stardate 3012.6. General Court-Martial convened. Mister Spock has again waived counsel and has entered a plea of guilty.
"The Menagerie Part 2" Begins with another log:
Personal log, stardate 3013.1. I find it hard to believe the events of the past twenty four hours or the plea of Mister Spock standing general court-martial.
I findit hard to believe that the events which Kirk found hard to believe began with the hearing for Spock. I think that the events which Kirk found hard the believe began with the revelation that no message was sent from Starbase 11, and the stealing of the Enterprise.
So I think this indicates that stardate 3013.1 was 24 hours after they reached Starbase 11, and the morning of the second day of the 6 day voyage to Talos IV.
Later:
Personal log, stardate 3013.2. Reconvening court-martial of Mister Spock and the strangest trial evidence ever heard aboard a starship. From the mysterious planet now only one hour ahead of us, the story of Captain Pike's imprisonment there.
So the six day voyage to Talo IV apparently has been completed in less than two days. Later the Keepr tells Kirk that:
KEEPER [on screen]: What you now seem to hear, Captain Kirk, are my thought transmissions. The Commodore was never aboard your vessel. His presence there and in the shuttlecraft was an illusion. Mister Spock had related to us your strength of will. It was thought the fiction of a court-martial would divert you from too soon regaining control of your vessel. Captain Pike is welcome to spend the rest of his life with us, unfettered by his physical body. The decision is yours and his.
It is my theory that the Talosians made Kirk forget about the court martial each night and repeat the court martial illusion each day, making Kirk think it was still the first or second day of the voyge, until the last day and hour of the voyage, when Kirk no longer had time to stop them.
Or maybe the episdode is so messed up with illusions and possible illusions that we have no way of knowing what really happened.
And, possibly, beyond, if Talosian influence is to be blamed for Spock's traitorous activities to begin with. Those started when he heard subspace gossip "months" before the events of the episode, and we can rather safely assume the Enterprise was far away at the time. It really is quite exceptional that Spock even could keep Kirk in the dark for those months, never mind that he would; perhaps the Talosians were messing with the whole ship for those months?
The DSC episode "If Memory Serves" gives us new data in that SB 11 is actually much closer to Talos than 18 ly. Not necessarily a contradiction of the idea that "we" would not have "ships or Earth colonies that far out" at the time of "The Cage"; SB 11 might have been established after those events, and indeed as the consequence of those events. But founding it only two lightyears from Talos would appear ill-advised if Starfleet thinks it through and realizes there was Talosian influence at 18 ly already during the original events. Then again, perhaps the base was established at the recommendation of the Talosians, who'd use compromised heroes as their mouthpieces?
Why Spock would consider the distance he speaks of to amount to "six days at maximum warp" when it doesn't take that long to go to Talos either in "The Menagerie" itself or in "If Memory Serves" is unknown, and not really the fault of anybody else but the writer of that line. Perhaps Spock was considering some other distance, or some other means of travel besides starships. But the latter at least would be at odds with his claim that he has it all "well planned" when we see the plan then involves hijacking a starship specifically. Perhaps Spock was lying to Pike, in order to conceal that what he was planning was not just a crime but actually high treason punishable by death?
Timo Saloniemi
This has always been the biggest hand-wave of the story with an explanation never even attempted

Could Spock have built some sort of telepathic relay into Kirk's communicator? Something similar on board the Enterprise too?
The good thing about such a device is that once activated, it could conceal itself from the subject's mind and thus never get detected so long as it continued to receive Talosian signals!
And it is my opinion that the Talosians can reach from Talos IV to Starbase 11, whatever the distance may be, with theiir telepathic powers, perhaps aided by hypothetical telpathy enhancing machines. Or else there are already Talosians at Starbase 11, unkown to those in Starfleet.