Given matrices $A$ and $B$, I want to find "nearby" matrices $A'$ and $B'$ that constitute a pseudoinverse pair. More precisely, given $A \in \mathbb{R}^{n\times m}$ and $B\in \mathbb{R}^{m\times n}$, find $A'$ and $B'$ to solve the following minimization:
$$\underset{A'\in \mathbb{R}^{n\times m}, B'\in \mathbb{R}^{m\times n}}{\mathrm{minimize}} \lVert A'-A \rVert_F^2 + \lVert B'-B \rVert_F^2,\\ \text{subject to } A'^{+} = B'$$
Is there a standard way to solve this?