Avoiding Matrix Inversion 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?

If you want to avoid computing $B^{-1}$, you can just compute $B^{-1}\vec b$ separately:


*

*Compute $B^{-1}\vec b$ by solving system of linear equations given by matrix $B$ with RHS $\vec b$.

*Compute $A\vec b$.

*Add 1.+2. You get $(A+B^{-1})\vec b$.

*Multiply 3. by $(\alpha A+I_d)$. You get $(\alpha A+I_d)(A+B^{-1})\vec b$.

