I think I understand and appears that there is some blended loan issue. That may be easy to fix or to find a strategy to insulate it.
Get personal tax advice as Terry says. Take the before loan statement and the after loan statements.
I'm confused by loan 3 which has a balance ...