The component VaR factors in both the marginal VaR and the asset value.
For A: 0.06782 × $5,000,000 = $339,100
For B: 0.18224 × $3,000,000 = $546,720
The percent of contribution to VaR is Asset A's component VaR as a percent of total VaR:
$339,100 / ($339,100 + $546,720) = 38.28%