Your expression is correct. Let's put some values in to prove that.
If the expression is 9A - 2B then we can state with a +1V input at both A and B, the output should be +9 - 2V = +7V.
You will see I have identified the inputs of the second amplifier with points X and Y.
Apply 1V at A. The voltage at point Y must therefore be +3V. The output will servo to maintain point X at this +3V. Apply +1V at B. Point X is therefore 2V more positive than B. To achieve this, the output must go 4V more positive than this point * so the output = 4+3 = 7V
- As the input resistor from point B will have 2V across it and there is no current into the inverting input, then the same current must flow in the feedback resistor. The ratio of voltages is the same as the ratio of resistances so the voltage across the feedback resistor must be 2 * 2V = 4V. As the voltage at the inverting input is 3V, then 3V + 4V = 7V.