A is crossed the crease and B is crossed half of the pitch. Run-out happening in A's side.
Then who is out, A or B?
In this scenario, Batsman B is out - as they have not crossed on this run, his ground is where the wicket has been broken, and so he's out.
This is covered by Law 38.3:
The batsman out in the circumstances of 38.1 is the one whose ground is at the end where the wicket is put down. See Laws 25.6 (Dismissal and conduct of a batsman and his/her runner) and 30.2 (Which is a batsman’s ground).