Hi Balanathan,
This is the scenario of Cross-Compnay Production.
If you have configured the cross-company config, then link the company B vendor to a plant (within Company B) and start the sub-contracting process like Stock Transfer process. In this Company A raises Sub Con PO to B and Company B withdraws components from Company A and do job work for A. Company B will produce goods for A by making In-house production / process order and makes a OBD for A. Company A accepts FG in its stock against that OBD.