Hi,
Your A, B, C are finished goods and raw material is X
You can have three BOM for A, B, C finished goods where raw material is only X.
BOM1 for A with X, BOM1 for B with X and BOM1 for C with X
As CUSTOMER sends X free of charge and also COMPANY buy raw material X from other vendor- you can go for maintaining split valuation by maintaining different price for same material X.
Regards,
Biju K