Can you provide more details? regarding B2B, you have this documentation docs.microsoft.com/…/invite-users-azure-active-directory-b2b-collaboration. Basically, you can “invite” users from other domains/tenants to your tenant. The license will depend on what functionality you want to provide (sales, customer service, etc). This, for Canvas/model driven.
For portals, both things are supported (B2C and B2B). The license again will depend on what you want to achieve, but there are “portal users” licenses. YOu have additional information on powerusers.microsoft.com/…/896139 and docs.microsoft.com/…/powerapps-flow-licensing-faq