The origins of X-ray emission from the hot spots of FR II radio sources