Hello yhameed81,
BGP dampening configured on router A won't allow you to achieve the mentioned behavior, since it work for NLRI received from neighbors. The most reliable way is to configure BGP dampening on neighbors connected to router A, since each time the route injected from OSPF disappears, router A will send a WITHDRAWN update and trigger penalty on remote neigbors with configured dampening.
--
Best regards,
Dmitry Skotnikov