Let x be the number of pounds of the $1.35 beans. The cost of those beans is $1.35 * x, or 1.35x.
Let y be the number of pounds of the $1.05 beans. The cost of those beans is $1.05 * y, or 1.05y.
We know that 120 pounds of the mix sells for $1.15/pound, for a total of 120 * 1.15 = $138.
x + y = 120
1.35(x) + (1.05)y = 138
We can rewrite the first as
x = -y + 120
Now we can substitute (-y + 120) in for (x) in the second equation, because we just proved they're equal.
1.35(x) + 1.05(y) = 138
1.35(-y + 120) + 1.05y = 138
-1.35y + 162 + 1.05y = 138
-0.3y + 162 = 138
-0.3y = -24
y = 80
And since x + y = 120, that means x = 40.
Check:
40 pounds of x at $1.35 costs 40 * 1.35, or $54.
80 pounds of y at $1.05 costs 80 * 1.05, or $84.
Do those add up to our target total, according to the question, of 120 * 1.15 = $138?