The correct answer is $\boxed{\text{(D)}}$.
(A) is not correct because the order of multiplication of matrices does not matter. In other words, $P(Q + R) \neq PQ + PR$.
(B) is not correct because the square of a matrix is not equal to the sum of the matrix and its negative. In other words, $(P – Q)^2 \neq P^2 – 2PQ + Q^2$.
(C) is not correct because the determinant of a matrix is not equal to the sum of the determinants of its diagonal elements. In other words, $\det (P + Q) \neq \det P + \det Q$.
(D) is correct because the square of a matrix is equal to the sum of the product of the matrix and itself, its transpose, and its negative transpose. In other words, $(P + Q)^2 = P^2 + 2PQ + QP + Q^2$.
Here is a more detailed explanation of each option:
(A) $P(Q + R) = PQ + RP$
This is not always true. For example, if $P = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$, $Q = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix}$, and $R = \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix}$, then $P(Q + R) = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix}$, but $PQ + PR = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 0 & 1 & 0 \end{bmatrix}$.
(B) $(P – Q)^2 = P^2 – 2PQ + Q^2$
This is not always true. For example, if $P = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$, $Q = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix}$, then $(P – Q)^2 = \begin{bmatrix} 1 & -1 & 0 \\ -1 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$, but $P^2 – 2PQ + Q^2 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$.
(C) $\det (P + Q) = \det P + \det Q$
This is not always true. For example, if $P = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$ and $Q = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix}$, then $\det (P + Q) = -1$, but $\det P + \det Q = 2$.
(D) $(P + Q)^2 = P^2 + 2PQ + QP + Q^2$
This is always true. To prove this, we can use the following identity:
$$(A + B)^2 = A^2 + 2AB + B^2$$
where $A$ and $B$ are any matrices. Substituting $P$ for $A$ and $Q$ for $B$, we get:
$$(P + Q)^2 = P^2 + 2PQ + Q^2$$