  We present a formula for the calculation of K-edge resonant inelastic x-ray
scattering on transition metal compounds, based on a local interaction between
the valence shell electrons and the $1s$ core hole. Extending a previous
result, we include explicit momentum dependence and a basis with multiple
core-hole sites. We apply this formula to a single-layered charge, orbital and
spin ordered manganite, La$_{0.5}$Sr$_{1.5}$MnO$_4$, and obtain good agreement
with experimental data, in particular with regards to the large variation of
the intensity with momentum. We find that the screening in
La$_{0.5}$Sr$_{1.5}$MnO$_4$ is highly localized around the core-hole site and
demonstrate the potential of K-edge resonant inelastic x-ray scattering as a
probe of screening dynamics in materials.
