Choose any student who solved problem 1 and ask them to explain that problem. Say they solved problems (1, x1). Then pick the other student who solved problem x1 and ask them to explain x1. Keep continuing the process and you will end up with a cycle looking like [(1, x1), (x1, x2), (x2, x3), ...., (x_k, 1)]. There might be multiple such cycles so everytime you get a cycle you can start the process again with any unexplained problem.
This is a bipartite graph where the parts both have uniform degree 2. Thus the part with students also has 20 nodes. Each connected component is thus a cycle with an even number of edges, and you can take every other edge from each cycle for B.