Sam has two bags of nuts; one with 77 % peanuts, and the other with 29 % peanuts. To make a 9 lb bag of 44 % peanuts, how much of each should Sam use?

.77P+.29p=.44*9 and

P+p=9