Hi, interesting questions. First, for the "sub-processes", you could create a product system with these two processes, and then integrate this product system in other product systems, making it really hierachical.
1) heat is just the product of A passed to B. You can inspect processes in ecoinvent to see how these are connected, for heat-using processes in ecoinvent
2) then heat is an elementary flow
3) then you need to split, it is a mix of 1 and 2, for A; since often, the share between the wasted and used heat is somewhat flexible, you can create a parameter that adresses this share (it is "used_heat" for the product, and 1-used_heat for the wasted heat, e.g.). Then, for B, you need to decide if A still provides all the heat needed (e.g., if used_heat is 0, this would not be possible); thus maybe you need to model for B the heat demand, and then again parameterise it (heat_required_from_A; 1-heat_required_from_A) with an additional process that provides the rest.
- material flow logic: you are here dealing with products and elementary flows, thus you do not need to go into waste modeling options