Every time I hear "President Rillak", I mishear it as "President Rellik" and think that she must be the evil murdering mastermind behind everything.
I think Burnham probably took some Academy courses, or maybe just the Command Training Program, and went through the Kobayashi Maru (remotely?) at that time. Spock may have skipped the CTP and was appointed a command officer by Pike and/or Spock after years as a science officer.
But, if Spock actually wrote the Kobayashi Maru (or adapted it from another program), perhaps at the Academy, maybe he wrote it in correspondence with his sister? The interpersonal timeline doesn't really work out though. Maybe she still took the test in her spare time to get a feel to what her brother was up to.
Of course, it would be very Spockian for him to say "I never took the test" when he damn near wrote it. And for Kirk not to realize or remark on that fact.