At the gymnasium, Sayako Kasui will hand the classroom 2-9 key to Yoshiki Kishinuma before turning evil. Yoshiki then hands it over to Akari Minamino, telling her to run back to that classroom in order to return to the real world. She will use it to unlock classroom 2-9.
Significant plot details end here.
The Classroom 2-9 Key does not exist in the Japanese versions of CORPSE-PARTY if and CORPSE-PARTY if PAST END. It was created exclusively for the English translated versions in order for this key to appear as the only item in Akari's inventory after she leaves Yoshiki.