There are pros and cons to each option. Both cameras are well-regarded overall and you cannot get much wrong.
The K-r has a newer more performant sensor and AF. If you are definite that your son loves photography, the K-r is a good option as long as he does not need WR.
On the other hand, the K10D is a good starting point, with a nice WR camera body and more in-camera controls. The savings (with the K10d) may allow you to buy him some good lenses that he will be able to re-use once he upgrade to a newer camera.
It is too often understated that
the lenses are more important than the body. Good glass is worth every penny. Better glass than body... So many says which reflect the plain fact that a good lens is more important than a good body.
For example, I just come back from holidays in family. My nephews used a K100d and I showed them how to use a couple of good lenses (FA50mm f2.8, FA*300 f4.5). They were amazed by the outputs compared to their basic lens (Sigma 18-125mm). Until you use some good-quality lenses, you would not know what you miss.
I hope that the comment will assist for now...