I'm reading a book about James Clerk Maxwell, and there is one passage that wrote
One great charm of Maxwell’s society was his readiness to converse on almost any topic with those he was accustomed to meet . . . no one talked to him for five minutes without having some perfectly new ideas set before him; some so startling as to confound the listener, but always such as to repay a thoughtful examination
As far as I understand, the author here talked about the charm of Maxwell in any conversation with anyone. That he wants to show that Maxwell had a great impression on the listener.
However, I don't understand the meaning of the phrase set before: Who is the subject of set before? Who is him here, the listener or Maxwell?
And I also doesn't understand the passage: but always such as to repay a thoughtful examination. Does the author mean that, the listener in the conversation with Maxwell would be repaid by a thoughtful conversation/idea/...? What does it mean here by examination?
Please help me.