x= cozonaci ; y=prajituri
8x+5y = 3400 => x= (3400-5y)/8
4x+9y = 3000
[4*(3400-5y)/8]+9y=3000
3400-5y+18y=6000
13y=6000-3400=2600 => y=2600/13=200
x=(3400-5*200)/8=(3400-1000)/8=2400/8=300
La o prajitura s-au folosit = 200 g nuci
La un cozonac s-au folosit =300 g nuci