I know that I should use the $(i,j)$th entries of the LHS and RHS to prove this however I did it and it didn't work out for me. Could someone please help me out?
My workings were:
The $(i,j)$th entry of the LHS: $$\sum_k a_{ik}(b_{kj}c_{kj})$$
The $(i,j)$th entry of the RHS: $$\sum_ka_{ik}(b_{kj}c_{kj})$$
Then I multiplied out the brackets. However I dont know if it was okay to use $a_{ik}$ when computating the $(i,j)$th entry of the RHS or if I should have had $c_{ik}$ instead.
First, it should be noted that the $(i,j)$-entry of $A(BC)$ is $$ \sum_{\ell=1}^na_{i\ell}\left( \sum_{k=1}^p b_{\ell k} c_{kj} \right) $$ and the $(i,j)$-entry of $(AB)C$ is $$ \sum_{k=1}^p\left( \sum_{\ell=1}^na_{i\ell} b_{\ell k}\right) c_{kj}. $$ You should be able to take it from here.