an alloy of metals is 20% copper. another alloy is 50% copper.how much of each should be used to make 1000 gram of an alloy that is 45% copper?

total mass: A+B=1000

copper mass: 1000*.45=.2A+.5B

solve for A, B