We suppose that A is a symmetric matrix, then A'=A… (1)
Consider
(B'AB)'={B'(AB)}'
=(AB)'(B')' [(AB)' =B'A']
=B'A'(B) [(B')'=B]
=B'(A'B)
=B'(AB)
therefore (B'AB)'=B'AB
Thus, if A is a symmetric matrix, then B'AB is a symmetric matrix.
Now, we suppose that A is a skew-symmetric matrix.
Then, A'=-A
Consider (B'AB)'=[B'(AB)]'=(AB)'(B')'
=(B'A')B=B'(-A)B =-B'AB
therefore (B'AB)'=-B'AB
Thus, if A is a skew-symmetric matrix, then B'AB is a skew-symmetric matrix. Hence, if A is a symmetric or skew-symmetric matrix, then B'AB is a symmetric or skew symmetric matrix accordingly.