Petr,
If you have a data grid in A containing B, the B entity records are already saved when creating them, so there seems to be no need to commit them separately. Microflows can contain multiple input parameters but not from a button in a form directly, like on your form A. However if needed you could retrieve the records in B from the input parameter A and then commit the list of B entries that you retrieved.