hmmmm.... have you picked him up to see if he's injured?
If he's hitting the glass so often, he may need a bigger enclosure. Or perhaps he's very stressed about the new friend in his space? For 2 white's you would want to go to at least a 30 gallon.
Does he have plenty of hiding spots? How's the humidity, temp? Are you using a water conditioner/de-chlorinator?
Sitting there panting with his nose on the glass could be anything really. But it sounds like stress to me.