This is the 3249th most frequent Polish word.
stolicą
"Stolicą" means "capital (city)."
Here, 'stolicą' is used in the instrumental case to describe 'Warsaw' as being the capital.
Warszawa jest stolicą Polski.
Warsaw is the capital of Poland.
'Stolicą' describes the role of 'the last place' in the trip, using it in the instrumental case as part of a descriptive clause.
Podczas podróży zwiedziliśmy kilka miejsc, a ostatnim była stolicą kraju.
During the trip, we visited several places, the last one being the capital of the country.
Here, 'stolicą' is in the instrumental case to indicate a connection or association.