Let's be honest, that kid is a moron. Most people wouldn't have even noticed the ads as they are so ingrained in the internet these days. The average person I know still clicks on the first google result, without realizing it's an ad, and wonders why it's not the correct website.
I've no doubt he'll make it as a programmer but there was no moral quandary here and the money probably would have done him a lot of good.