Spatial and temporal evolution of soft and hard X-ray emission in a solar flare