Which of the lawyer's activities most changed him?
No single activity changed the lawyer. The cumulative experience of his imprisonment over the fifteen years, all the things he read and studied, they all changed him.
It was not just the study of the piano, the novels, the languages, the philosophy, the histories, the Bible, the theology, and not even the Byron or the Shakespeare. No, that is the point: together they changed him. He absorbed all of it; he became smarted than everyone through all those years of study and reading and came to the conclusion that it all amounted to nothing. Here: he says it right here:
And I despise your books, I despise wisdom and the blessings of this world. It is all worthless, fleeting, illusory, and deceptive, like a mirage. You may be proud, wise, and fine, but death will wipe you off the face of the earth as though you were no more than mice burrowing under the floor, and your posterity, your history, your immortal geniuses will burn or freeze together with the earthly globe.
You have lost your reason and taken the wrong path. You have taken lies for truth, and hideousness for beauty. You would marvel if, owing to strange events of some sorts, frogs and lizards suddenly grew on apple and orange trees instead of fruit, or if roses began to smell like a sweating horse; so I marvel at you who exchange heaven for earth. I don't want to understand you.