There is nothing in Kirk's "two and a half years" remark to rule out that he could have commanded another ship, task force, or space station as a flag officer after he relinquished command of the Starship Enterprise at the end of his famous five-year mission but before he became Chief of Starfleet Operations.
So it could have gone like this:
(NOTE: I have based some of my conjecture on the non-cannon novels "The Prometheus Design" by Sondra Marshak and Myrna Colbreath, and "My Enemy, My Ally" by Diane Duane.)
2261: Design begins on the new Starbase One, also known as Spacedock City Earth.
2265: Kirk assumes permanent command of the Enterprise, after temporarily taking over from Fleet Captain Pike.
2266: Design is complete on Phase One of the huge new Spacedock City, the first portion being the Orbital Office Complex. Component fabrication and construction of the new facility begins.
2268: The Constitution-class Federation Starship U.S.S. Tzaled ("Intrepid"), manned by Vulcans, is destroyed near Gamma 7A.
2269: Design and testing begins on components of the new fourth-power linear warp drive. A prototype refit Constitution-class starship fitted with a crude prototype linear warp drive, U.S.S. Tzaled-A, is deployed by the Vulcans. (Diane Duane's "My Enemy, My Ally")
2270: The Enterprise ends its famous five-year mission, and Captain Kirk is promoted to flag rank. Kirk assumes a new deep space command.
2273: Linear warp drive is certified as stable and standardized as a star-drive technology to replace third-power circumferential warp drive. Design begins on new-generation linear-warp-driven starships. A new generation of the Constitution-class, called the Tzlaed-A-class, will be based on the Vulcan "Intrepid" prototype. The new Miranda-class starships also begin design phase.
2276: Kirk is promoted to Chief of Starfleet Operations, ending his six-year deep space assignment. The first phase of Spacedock City, the Orbital Office Complex (the "inner base of the Mushroom") is complete. Testing begins.
2278: The Orbital Office Complex testing complete, the first phase of Spacedock City construction is now made fully operational. Design begins for additional sections of the "Mushroom".
2279: Admiral Kirk assumes command of the newly refit Enterprise (which uses the new linear warp drive), after two-and-a-half years in Operations. Fabrication begins on Phase Two of Spacedock City.
2280: Construction begins on Phase Two of Spacedock City. Construction and mass refits begin on Constitution (Tzaled-A) and Miranda-class starships. Fleet Admiral Savaj of Vulcan reveals "The Prometheus Design" when Spock temporarily assumes command of the Enterprise.
2282: As construction of Phase Two is complete, testing begins. Design also begins on Phase Three.
2283: Phase Two of Spacedock City is made fully operational. Construction of Phase Three begins. Design of Phase Four, the final phase, begins.
2284: Construction of Phase Three of Spacedock City is complete. Testing begins. Construction of Phase Four begins. After completing its first five-year-mission since being refit, the Starship Enterprise is re-assigned to Starfleet Academy as a cadet training vessel under the command of Captain Spock.
2285: Construction of Phase Four of Spacedock City is complete. Testing begins.
2286: Spacedock City is certified complete, and is formally dedicated Starbase One. The Starships Reliant and Enterprise are destroyed in the Mutara Sector. The Whalesong Probe attacks Earth. Testing begins on the new Excelsior-class starship.