8 items
jams+breadmix=8
x+y=8
total value is 45
value of jam=x times cost per jam=x times 6=6x
value of bread=y times cost per bread=y times 5=5y
total value=bread value+jam value
45=5y+6x
we have
x+y=8
6x+5y=45
solve
multiply first equaton by -5
-5x-5y=-40
add to first equation
-5x-5y=-40
6x+5y=45 +
1x+0y=5
x=5
subsitute
x+y=8
5+y=8
y=3
5 jars of jam
3 jars of bread mix