I'm translating a song as part of a project.
What is ki used for? Is it a prefix for kokyou?
Natsukashi ki kokyou
In late middle Japanese, the actual class of い-adjectives was in fact subdivided into 2 classes, namely ク-adjectives and シク-adjectives. There is remnant of those adjectives even now, though there are mainly to be found in novels or songs in order to add a touch of old.
Here, we have 懐かしき, it is the old 連体形 (the base you should use to modify a noun or clause) of 懐かしい which was a シク-adjective. So here basically, you can understand 懐かしき故郷 as 懐かしい故郷. They mean the same, but the variant with き is not in current use anymore, save for artistic purposes.