Agree with Redhawk. Both trees have similar rooting characteristics—shallow, fine roots for most citrus trees. That poor grapefruit will never thrive in that location. Yucca are tough, strong plants. They thrive in places where other plants struggle. Grapefruit (and most citrus as well) are also tough, but why put them in a place where they'll have to engage in a fight to the death? You want them cooperating, not competing.
The other thing I've found with various species of yucca plants is that their roots can be invasive, and can even be sidewalk busters. I'd never plant one close to any sort of hardscaping or foundation. I've seen yucca lift a block wall with an 18 inch footing and lean it over in less than 7 years. Once they get their roots under something, it's going to come up. I see people planting them next to their house and I think, "You're basically planting a hydraulic jack next to your foundation. This will not turn out well."
That said, there are dozens of different kinds of plants that commonly get called Yucca. I'm not familiar with that specific plant (and there isn't
enough of it in the picture to clearly identify it) but my hunch is that it's not compatible with anything being planted close to it.
"The rule of no realm is mine. But all worthy things that are in peril as the world now stands, these are my care. And for my part, I shall not wholly fail in my task if anything that passes through this night can still grow fairer or bear fruit and flower again in days to come. For I too am a steward. Did you not know?" Gandolf