So I'm doing a past midterm and have no clue how to solve this problem
Let $p$ be a prime, $k \geq 1$, and $P$ a group of order $p^k$ :
1) Consider the action of $P$ on itself by conjugation. Show that the set of fixed points is equal to the center $Z(P) = \{x \in P : xy = yx \textrm{ for all } y \in P\}$.
2) Consider a composition series of $P$. Determine the center of the composition factors.
For the first one the fixed points of $P$ are all the $x\in P$ such that $gxg^{-1} = x$ for every $g\in P$, that is all the elements that satisfy $gx = xg$ so it's the center of $P$.