Here's a photo of my cupholder assembly that I took to try and find a used replacement. From this you can see if you have the same assy. The tabs that hold the assy in are circled in the upper right view.
Basically, I made a flat wire form to replace these tabs that broke off.
As I mentioned earlier, after many trials, the eventual material that worked was the flat metal piece that holds the rubber wiper blades in place (which I'd just replaced).
I'll try to describe the part feature by feature.
At one end is a triangular bend (like a numeral "4" laying flat) that serves as the locking tab. It's critical that the locking surface is the correct length and height.
Then the part has a 90 degree twist with a slight offset. I made this feature by putting the part in a soft jaw vise and carefully twisting it with a crescent wrench.
Then there is flat section that goes between a plastic screw boss and the side of the tray. Finally, there is a loop that wraps around the screw boss. I made this feature by wrapping the stock around a screwdriver shaft.
Finally, the pieces were epoxied in place. Make sure you know how the pieces go back together, so you don't create an interference. One of the bosses has a spring on it so you have to avoid that one.
Although the two sides are similar, the parts are still fairly different (e.g length, offset, etc.).
It cracks me up that we're going through all this for a lousy cupholder. Maybe someone will help me with a fix like this for my side window trim that's starting to separate. I hope this helps. Good luck.