The lens system is an important factor. Bodies change and can be replaced.
If you already own loads of brand A lenses, it makes sense to stick with brand A unless you are made of money. Think carefully which brand of lenses you want to use. Qs like will you have enough money for Sony glass? – its good but pretty expensive options relative to others.
For starting from scratch, for 400 quid with the 2 lenses and that body. I think the K-x is a bloomin bargain. As said above, if you can play with one in a shop it will help. If it feels fine to you it’ll certainly trump the others for specifications and it seems a good value lens system.
Here is the comparison against the D3100
http://snapsort.com/compare/Nikon_D3100-vs-Pentax_K-x
I dont own any pentax gear or work for them (ive had panasonic for awhile and got a tough sony compact on the way). But I sure like the look of the K-x and new K-5 (a monster).