And let's take a good look at the teaser to The Ultimate Computer. Kirk and Spock were both surprised to have Wesley beam aboard. If the Lexington was Bob's ship, where was she? Certainly not in scanning range of the space station!
You got a point, apparently Lexington
was nowwhere near the space station (unless it's a bigger one than K-7 but with similar proportions and capable to hold a ship inside, though I don't like this idea).
But Wesley could have used a warp shuttlecraft, leaving the ship with the first officer, to proceed to Commodore Enright's station to personally oversee Dr. Daystrom's final M-5 preparations.