Real Space Green's Function Approach to Resonant Inelastic X-Ray Scattering and HERFD XAS