Scenario 1 both A and B owned by same person. B enters bills, pays bill from a clearing account, deposits "money" paid on its behalf into the clearing account from owner equity contribution. In A the money out for B is owner draw.
If there is no relation between the companies or tge ownership is different, do as above with clearing account but depksit to zero it from a new liability account. I would use Current Liabikity instead of long term simply because the loan amount is always fluid with no strict repayment terms and due date. In A the loaned money is an Other Current Asset.
The IRS may, if you were audited, require the imposition of imputed interest on the loan.