I am having trouble figuring out the following matrix derivative
$\frac{\partial(B X A')(AX A')^{-1}}{\partial X}$, where $X$ is square $n\times n$, A is $m\times n$, with $m<n$. and B is dimension $l\times N$.

I started with $\frac{\partial BX A'}{\partial X}(AX A')^{-1}+ (BX A')\frac{\partial (A XA)^{-1}}{\partial X}$, but I can't properly figure out the second term.