I think you can transfer if the first H1 is approved. For H1B transfer, there is nothing to do with A company. Find a lawyer, and talk to him/her. Don't be scared by the first reply.
Good luck.
Good luck.