By "really" understand RB, I mean understand it's a) only as good as the assumptions you make and b) that you can apply it more than once. The point of RB in open water is you know you have enough to get you+buddy from where you are (the bottom) to somewhere else (the surface). Gee, what if you need to get back to the anchor before ascending? It's the same concept, although rather than depth, it's dependent on how far away you swim. With the assumption of no current and no difference in breathing rate on the shared return, it turns out RB is 2x what you used going away. This is precisely where the Rule of Thirds comes from. When you do it a second time like this, it's more commonly known as Modified Thirds (subtract off the ascent gas from what you have now and use 1/3 of the remainder to explore).
A good understanding of RB would also tell you that Thirds (Modified or otherwise) ain't going to cut it if the consumption rate changes or you're swimming into current on the return. However, you should also know how to modify your calculations to reflect those new assumptions. If it turns out you need 3x what you used going away, well that's (Modified) Fourths. Etc.
Nothing changes in a cave. It's all the same math as you would do for an open-water dive (assuming you want to ascend where you descended). Circling back, the takeaway should be gas planning is only as good as the assumptions you put into it. Hopefully that's enough to satisfy your inner nerd until you can discuss safe numbers for those assumptions with your cave instructor (someday, right!). In the meantime, plan your OW dives with Rock Bottom and Modified Thirds (or Fourths, Fifths, or Sixths) for excursions away from the anchor.