Upload & Sell: On
If you can use them in manual mode, just about any flash will work in the hot shoes of both cameras, as well as off camera with inexpensive, trigger-only radios.
If you want advanced automatic flash, then it's another matter, because each manufacturer has its own code system, hot shoe pin arrangement, etc., and so flashes become brand-dependent. (About the only exception is Nikon and some Fujis using the same system, because Fuji used to use Nikon-based bodies.)
I don't know how you use them, of course, but if it were me, I'd use the X100 mostly for street photography-style shooting and candids, and the K5 for more-planned shooting and for action work. So I'd get a Pentax-compatible flash to take advantage of the K5's TTL Autoflash features, and use manual flash with the X100 on those times when available light and/or the built-in flash weren't enough.
(Actually, I would have a dedicated camera-brand flash for each, but I think you know what I mean.)