Capitalism is the process selling goods & services for profit to buy goods & services. Mercantilism is the process of buying raw materials and transforming them into a manufactured good.
Mercantilism works in Capitalism, as both buy and sell goods. But Mercantilism specifically buys goods to recreate or process them for a product and sell it for profit.