Set B up as a customer
create a service item called dumpster fee and select an income account, other income wouuld be my suggestion
pay the expense for the dumptster
invoice company B and receive payment
on the P&L income is reduced by expense, so in this case if there were no other transactions the P&L would look something like
income, 50
expense, 100
net income, -50
-50 is your expense for the dumpster