What was Mr.Underwood doing during the confrontation in Chapter 15?
If you are referring to Chapter 15 in To Kill A Mockingbird, I would say that this is one of the most harrowing events in the novel. In this chapter, Atticus tries to keep the mob from lynching Tom Robinson, who is at the Maycomb jail.
Harper Lee doesn't let on about Mr. Underwood's presence until the frightening episode is over. In fact, Mr. Underwood had been in the background all along, sitting quietly in his own apartment above the Maycomb Tribune office with a double-barreled shotgun, ready to fire in case the mob became violent. He tells Atticus that he had Atticus' back covered the entire time. In Chapter 16, Atticus comments that Mr. Underwood is rather a strange fellow:
“You know, it’s a funny thing about Braxton,” said Atticus. “He despises Negroes, won’t have one near him."
Later, after Tom Robinson's death, Mr. Underwood wrote a scathing editorial about how the town had treated an innocent man, likening 'Tom’s death to the senseless slaughter of songbirds by hunters and children...'
In Chapter 15, Atticus defends Tom Robinson outside of the Maycomb jailhouse by refusing to leave when the Old Sarum bunch arrives. During the confrontation, Scout runs out into the middle of the mob and recognizes Mr. Cunningham. After trying several times to get Mr. Cunningham's attention, Scout is finally successful, and Walter tells the mob to leave. After the mob leaves the jailhouse, Atticus tells Tom Robinson that the Old Sarum bunch will not bother him anymore. From across the street, Mr. Underwood yells, "You're damn tootin' they won't. Had you covered the whole time, Atticus."
Mr. Underwood was leaning out of his window holding a double-barreled shotgun. Mr. Underwood was watching the entire situation from the window of his office while holding his shotgun. He was looking out for Atticus and was willing to intervene if something happened.