In matrix form, you want to show that y = Bx and z = Ay implies that z = (AB)x. From the assumption, it follows that z = A(Bx), so what you need to show is associativity of matrix multiplication: A(Bx) = (AB)x.
Let A, B and C be matrices of compatible sizes. Then
So we get