It’s weird and dumb and arbitrary, but just to answer your uncertainty, it’s “capital” in this context.
Capital means, in vague terms, the highest of something. So in regards to a city, it refers to the most important city (for the government, anyways) in a given administrative region (e.g., state capital, national capital).
Capitol, with an O, refers specifically to the building where the US government is housed and the hill it sits on.
I don’t know if they have a shared etymology but it wouldn’t surprise me.