Whilst going over my undergraduate notes on General Relativity, I came across the Quotient Rule for tensors: Briefly, if $\mathbf{X \, A} = \mathbf{B}$ with $\mathbf{B}$ being a non-zero tensor and $\mathbf{A}$ any arbitrary tensor, then $\mathbf{X}$ is a tensor as well. For now, we can assume all tensors considered are Cartesian. I am trying to apply this rule to the following example.
Let's say the components of $\mathbf{B}$ are given by $$ B_{ij} = X_{ijkl} A_{kl}.$$ I want to verify that $\mathbf{X}$ is a tensor as well. I start off by writing out the transformation of $\mathbf{B}$ under a "rotation" to new, primed coordinates: $$ B_{ij}' = X_{ijkl}' A_{kl}'.$$ Since $\mathbf{A}$ and $\mathbf{B}$ are rank-2 tensors, their components transform like so: $$B_{ij}' = a_{i p } a_{j q} B_{pq} \\ A_{kl}' = a_{kx } a_{ly} A_{xy}.$$ I substitute these into the previous equation to get $$X_{ijkl}' a_{kx}a_{ly} A_{xy} = a_{ip}a_{jq}B_{pq},$$ and I further substitute in $\mathbf{B}$, so I have $$X_{ijkl}' a_{kx}a_{ly} A_{xy} = a_{ip}a_{jq}X_{pqkl}A_{kl}.$$ Here, I am unsure how to proceed. I believe the problem is well-defined, and I know that in order to show $\mathbf{X}$ is a tensor, I need to show it transforms something like $$X_{ijkl}' = (\mathrm{four \, terms})\, X_{pqkl}$$ with 4 free indices. How do I get these extra terms? Any help is greatly appreciated.