Interesting problem. Just in case it’s not clear, X mentioned by @ricardoV94 corresponds to the ground truth of presence X=1 or absence X=0 as established by test C.
Is the sequential nature of test A and B a red herring? For example, if test B is always conducted regardless of the outcome of test A, then it might be conceptually clearer to think about it as a regression style model. Especially because the result of test A will presumably not affect the result of test B.
Goal 1 can be approached by using the results of test A to predict the ground truth.
Goal 2 can be approached by using the results of test A and B to predict the ground truth.
Not sure if that helps, but happy if you want to expand on describing your problem in more detail.