It depends on what skills are necessary to succeed at test X and Y. While the subject matter or details thereof might differ, it's possible that things like "knowing how to learn to the test (i.e. cramming)" or "reading between the lines of what the teacher/professor says is relevant" belongs to these skills. And these can absolutely be transferred between test X and Y.
So the question is, how much do these tests actually test skills in the subject matter and how much to they test "meta skills"?