I replaced the port side rub rail and other repairs on my O'Day 192 (a smaller version of your 222) a few weeks ago. I got the part from D & R Marine. The only hassle was that they only have it in white and mine was beige. It looks ok anyway if you make any transitions at the corners. I decided to take out the screws and retain them and fill the holes with marine tex and drill new ones. I used a crayon to mark where not to drill into the screws holding the deck onto the hull.
The rub rail holder is only slightly flexible. Try to do the job in the heat of the day and season so that it bends abit easier. I also used a rosette or counter sink on the rub rail after drilling the holes so that the screw heads went into the rub rail like the original. I was was able to get by putting the old black rubber piece back into the rub rail holder. Due to its age, it was stiff and took a bit more effort to stuff into place. In retrospect I might buy that part new too. The rub rail is plastic and cuts easily with a hand saw. I used a hacksaw.
The investment of a few bucks and few hours yielded a much nicer looking hull than the beat up rub rail I had. I bought a couple more
fenders and will attempt to pay more attention to protecting it now.