The answer has first "ji" and then "jí". (That is, without and then with the diacritic mark.) Is that correct?
Yep. The first JI is accusative, the second JÍ is dative.
Can you use Kdy instead of Az?
Is it okay to use "Kdy" instead of "Az"? I'm thinking that "Az" is more like "until" than "when". No?