Alloy #13 contains 7% gold, if means that if we need 2.7kg of this alloy, we will have to use a certain amount of gold. Multiply the percent of gold times the mass of alloy to find how much gold we need:
It means that we need 0.189kg of gold.
The alloy we have contains 21% of gold. That means that for every 100kg of alloy there are 21kg of gold, use this ratio to find the mass of alloy we need:
It means that we need 0.9kg of that alloy.
To find how much magic steel we need, we just have to substract this mass from the mass of Alloy #13:
It means that we need 1.8kg of magic steel.
The answer is: The dwarves need 1.8 kg of magic steel and 0.9 kg of their alloy in order to get 2.7 kg of Dragon Alloy #13.