Gateway in a device reacheble on another router by OSPF

Hello,

I have a small network with basic OSPF configured. On the first RB I have a network behind it on ether2 (10.2.2.0/24), and another RB on port ether1. I announced the network 10.2.2.0/24 and the second RB can reach devices on that network. Now, I want to use uma device on that network as a gateway, but although the device is reacheble, in the routing table when I try to use that address as gateway it says it is unreacheable. Is there a way I can do that? I don’t want the OSPF to announce all it’s gateways to the other RB since their gateways differs, I only need that single device connected on RB 1 to be able to be a gateway on RB 2. Or is it just impossible?