This statement becomes ironic when Montag turns his flamethrower on Beatty and burns him to a cinder. Beatty has turned harshly on Montag, has arrested him for book ownership, and worse, has discovered Montag listening to an accomplice through an earpiece. Beatty has, in a word, become a problem. Beatty also taunts Montag, saying, mockingly, that Montag should "belch" Shakespeare at him, then struts his stuff and quotes from Shakespeare himself. He challenges Montag to kill him, asking him why he doesn't pull the trigger. Beatty also promises to ferret out Faber, Montag's co-conspirator. At this pivotal time, Montag decides to take Beatty's advice, and burn a problem rather than face it. When Beatty, always cocksure, gave out his advice, he probably never imagined that Montag would implement it quite this way. As Bradbury puts it:
And then he [Beatty] was a shrieking blaze, a jumping, sprawling, gibbering mannikin, no longer human or known, all writhing flame on the lawn as Montag shot one continuous pulse of liquid fire on him. There was a hiss like a great mouthful of spittle banging a redhot stove, a bubbling and frothing as if salt had been poured over a monstrous black snail to cause a terrible liquefaction and a boiling over of yellow foam. Montag shut his eyes, shouted, shouted, and fought to get his hands at his ears to clamp and to cut away the sound. Beatty flopped over and over and over, and at last twisted in on himself like a charred wax doll and lay silent.
A lesser writer might have said, live by the sword, die by the sword.
The statement is ironic, because when Millie calls in the authorities and reports Montag, and his house is to be burned, he feels like he is burning his old life which, for him, was a problem.
Even though Beatty does not understand how this is significant, Montag watches his house burn with a sense of relief that he is rid of his old life. Therefore, it is ironic, because Beatty would not understand Montag's desire to be a book reader. So Beatty's advice which applies to the commonly defined problem of "books" actually serves Montag in the opposite way, freeing him from the society that he no longer feels he belongs in and severing his relationship with his wife.