Welcome to the forum, @omerarshad!
Nice questions, I had the same problem, too. In my opinion this is possible only if you have ground truth for the intermediate step and not only the final reference. What you might do is to train two models separately: the first one with the intermediate reference, and the last one with the final reference.
Schematically:
Input -> MODEL_1 -> Output_1
                        | compare (cross-entropy)
             Intermediate Reference

Intermediate Reference -> MODEL_2 -> Output_2
                                        | compare (cross-entropy)
                                  Final Reference

What do you think?