If you send, from Processing, the temperature, as a string, the Arduino will get something like "78" (if it's a warm day in the US).
Where, exactly, do you deal with that, in the Arduino code? The ONLY thing you care about is 'a' or 'b'.
You need to have the Processing app send something like "a!", "b!", "t78!". Then, you read AND STORE the data in an array, until the ! arrives. When the ! arrives, you can use the data ('a', 'b', or "t78").
It isn't rocket science to change "t78" to " 78", and call atoi() to get 78 or just use the string.