How to use Question Answering Model in second step with data generated in first step

I am currently working on a 2 step approach for my task where the question is generated in the first step. I am not able to understand how to implement the code. I need to first implement a model for the question (e.g., say a simple classification problem) and then I need to use the prediction output of the first step and form a question with that and then solve it for a question answering problem. Can someone give me some ideas as to how can I implement it?