If I were you, I would contact my previous manager in A office first to tell him that I’m applying for a job in B office, and B office HR would like to contact him…
As long as you are a good employee, be confident and sincere, you will get help from him.
Good luck!