Set up two equations
x+y=1000 since the amount of both alloys needs to add up to 1000
(50x+25y)/1000=45 this is the equation for the percent of the new alloy
then combine the two equations and get rid of the y variable which leaves you with .025x=20. so the answer is 800 grams of the 50% metal alloy are used.