if i owe a contractor for work on project B, and he owes us for work to another sub because of a (back charge) on project A, Can I use the funds owed on project B, to pay towards that other sub on project A
The legal analysis would start with a review of your contract(s), and then extend to any communications which have occurred.
As a practical matter, if there was to be a suit, all claims from whatever project would be at issue either as a claim or a counterclaim.
Retain a construction attorney to evaluate your situation and to provide advice.
Good luck.