How to display a register within another register?

I have the following problem: there is a register (A) that has several imputs, and within this register I need to insert a sub-register (B), because for the register (A) to be completed, the user needs to inform at least one record in the sub - registration (B). It may even have more than one sub-register (B) within (A).

This occurs in a web system that we have, and the register (A) was created in a tabbed structure.

I am thinking of showing the sub-register (B) in a dialog box, however, I am concerned with the experience in mobiles.

See this wireframe to better understand:

wireframe

I forgot to mention that (B) will have some steps, and depending on what the user chooses, the steps can be changed.