Use a proof by induction on $m$:
$(a)$ It seems to me, then, that you have your base case $m = 2$: $P(2)$,
$\quad$ though it suffices, for a base case, to prove it's (trivially) true for $m = 1$.
$\quad$ But the process used in class for proving it's true for $m = 2$ will be helpful when making the
$\quad$ inductive step of the proof.
$(b)$ Your inductive hypothesis $P(k)$ would be to assume that this is true for $m = k$.
$\quad$ That is, assume the truth of: $P(K):\quad \det \begin{bmatrix} A_1 &* &* &* &* &* \\ 0& A_2 &* &* &* &* \\ .& 0& A_3 &* &* &* \\ .& 0& 0 &... &* &* \\ .& 0& 0& & ... &* \\ 0& .& ...& 0&0 & A_k \end{bmatrix} = \prod_{i=1}^k \det A_i $ $(c)$ Then, take the inductive step: you'll need to use the inductive hypothesis to prove that $P(k+1)$ is true: for $m = k + 1$... That is, assuming $P(k)$ is true, prove: $ \det \begin{bmatrix} A_1 &* &* &* &* &| &* \\ 0& A_2 &* &* &* &| &* \\ .& 0& A_3 &* &* &| &* \\ .& 0& 0 &... &* &| &* \\ .& 0& 0& ...& A_k &| &* \\ \hline& & & &\\ 0& 0& ...& 0&0 &| & A_{k+1} \end{bmatrix} = \prod_{i=1}^{k+1} \det A_i $
Note that to do this, you can partition the matrix into two block matrices on the diagonal,
$(1)$ one of which is triangular (block) matrix with $k$ sub-blocks $A_i$ for $1 < i < k$ along it's diagonal, for which the determinant you know from the inductive hypothesis (having assumed its truth), and
$(2)$ the other with one block on the diagonal which we call $A_{k+1}$.
Here is where you can use the proof used in class for $m = 2$
That is: $\prod_{i=1}^{k+1} \det A_i = \left(\prod_{i=1}^{k} \det A_i\right)\cdot \det(A_{k+1}) $
Then you will have shown that the determinant of a partitioned triangular matrix is product of the determinants of the block matrices on the diagonal.