How to train 2 network in sequential order simoultaniously using a single loss funtion in the end?

Yes, it will work that way.
If you want to keep 2 separate networks, you have to do as explained in this post: Giving multiple parameters in optimizer