I started with the K-x around a year ago and recently acquired the K20D, so perhaps I can offer some insight.
The K-x has terrific high ISO noise performance, but the K20D is no slouch either. I've found that with the K-x you can get away with ISO 6400, but I'd say the upper limit is 3200. The K20D tops out for me at 1600, and maybe 3200 if absolutely necessary. So basically, the K-x has around a one stop advantage, IMO.
Build quality is no contest, the K20D is tough, rugged and grippy, while the K-x is very much less so. The K-x isn't bad, it's just that the K20D is exceptional. The K20D has two command dials, and more buttons to change settings quickly and easily.
The K-x can take HD movies, while the K20D has some psudo movie mode thing... frankly I haven't found where to use this, but then again, I can probably count the number of videos I've taken with my K-x with one hand, so video isn't a priority to me.
If you can find that refurbished K20D set, it comes with the metal mount 18-55 with quick shift and hood- higher quality than the DAL 18-55 that comes with K-x.
The K-x is much lighter. I found my hand getting tired from using the K20D after a short while, (probably also because I don't have a strap on it right now, preferring to death grip it) but I've acclimated a bit. If you have bigger hands, the K20D should feel right at home.
The K-x shoots like 5 fps, while the K20D only shoots 3 fps. I left my K-x on single shot before I got the K20D, so this didn't matter to me at all.
The K20D AF tends to hunt. It will get very very close to the correct focus point and then typically make small adjustments to lock focus. The K-x either does this much faster, or doesn't do it at all- it just seems more zippy and responsive.
The K20D viewfinder is larger and the bottom status bar is actually legible in bright light. Overall much better than the K-x.
I could trust the AWB on my K-x. I now set the WB manually all the time with my K20D, it just can't be trusted with artificial lighting IMO.
Sorry if these points seem random, I pretty much just typed them as they came to mind! I'll add more if I think of anything else