I have as input values the matrices $A,B\in\mathbb{R}^{n\times n}$, where $B$ is invertible, vector $\vec{b}\in\mathbb{R}^n$, and $\alpha\in\mathbb{R}$. Denoting the identity matrix by $I_d$, I am computing the value of
$$(\alpha A+I_d)(A+B^{-1})\vec{b}.$$
However, as computing the value of $B^{-1}$ is quite expensive, I wish to instead solve a system of linear equations. Letting $\vec{x}:=(\alpha A+I_d)(A+B^{-1})\vec{b}$, I tried
$$\vec{x}=(\alpha A+I_d)B^{-1}B(A+B^{-1})\vec{b}=(\alpha AB^{-1}+B^{-1})(BA+I_d)\vec{b}.$$
Then, multiplying by $B$ on the left for both sides I obtain
$$B\vec{x}=(3BAB^{-1}+I_d)(BA+I_d)\vec{b}.$$
However, I cannot figure out a way to remove this troublesome $B^{-1}$. Is there any way to do so, or am I stuck computing this inverse?