Answer
When A is right multiplied by D, its columns are multiplied by the diagonal entries of D.
When A is left multiplied by D, its rows are multiplied by the diagonal entries of D.
B can be any scalar multiple of A or any power of A.
Work Step by Step
A=$\begin{bmatrix}
1 & 1 & 1 \\
1 & 2 & 3\\
1 & 4 & 5\\
\end{bmatrix}
$ and D=$\begin{bmatrix}
2 & 0 & 0 \\
0 & 3 & 0\\
0 & 0 & 5\\
\end{bmatrix}
$
AD=$\begin{bmatrix}
2 & 3 & 5\\
2 & 6 & 15\\
2 & 12 & 25\\
\end{bmatrix}
$
When A is right multiplied by D, its columns are multiplied by the diagonal entries of D.
DA=$\begin{bmatrix}
2 & 2 & 2\\
3 & 6 & 9\\
5 & 20 & 25\\
\end{bmatrix}
$
When A is left multiplied by D, its rows are multiplied by the diagonal entries of D.
B can be any scalar multiple of A or any power of A.
If $B=A^2=\begin{bmatrix}
3 & 7 & 9\\
6 & 17 & 22\\
10 & 29 & 38\\
\end{bmatrix}
$
$AB=\begin{bmatrix}
19 & 53 & 69\\
45 & 128 & 167\\
77 & 220 & 287\\
\end{bmatrix}
$ and $BA=\begin{bmatrix}
19 & 53 & 69\\
45 & 128 & 167\\
77 & 220 & 287\\
\end{bmatrix}
$