I said it was the easy answer! There are of course more complicated examples. In tierce de picardie examples you invariably resolve to the tonic major, so the root would imply what key you’ve been in based in. Of course in those styles of writing it is likely you’ve also modulated through numerous keys as well. In the more modern examples suggested you are of course right, but in those cases you look at related substitutions or cadences and get the ball park. As someone once said about this wonderful art form, it doesn’t have to be correct, it just has to be right.