The enhancement of x-ray-matter interaction by guiding and focusing radiation from x-ray free electron lasers is investigated theoretically. We show that elliptical waveguides using a cladding material with a high atomic number, such as platinum, can maintain an x-ray intensity of up to three orders of magnitude larger than in free space. This feature can be used to place a nuclear sample in the waveguide focal area and drive nuclear Mössbauer transitions up to transient nuclear population inversion. The latter is a long-standing goal related to gamma-ray lasers or nuclear state population control for energy storage. We show that inverted nuclei numbers of up to approximately 2×105 are achievable in the realistic region of longitudinal x-ray-free-electron-laser coherence time ≤10 fs. Our results anticipate the important role of tapered x-ray waveguides and strategically embedded samples in the field of x-ray quantum optics.