Hi Charles,
Take your first Mask (white Rim) and Multiply it with a Tyre Mask (Tyre black), then Invert it.
You can also, instead of, or in combination with View Layers, use Cryptomatte to make your life a bit easier (to get that Tyre Mask, for instance):

It’s always just a matter of Multiplying (sometimes Inverted) Masks, remembering that multiplying by 0 (black) returns Black and multiplying by 1 (white) doesn’t change anything.
For instance (and I’m sure this can be done a lot easier):
