Asymptotic stability, which means that all eigenvalues of $A$ are in the open left half plane is easily proven. See the scan in the attachment. However, in the book the proof for the second case where all eigenvalues are located on the imaginary axis the proof is not given.
The question is as follows.
Consider the linear system $\dot x = Ax$ and assume the matrix $A$ has only eigenvalues on the imaginary axis. Prove that the system is (marginally) stable if and only if $A + A^T = 0$ (Note that the latter means there is a matrix $P \in S^n$, $P \succ 0$ such that $A^T P+ PA \leq 0$. Indeed, take $P = I$.)
I am completely stuck with this. I do not see why the latter should mean that there is such a $P$, also I am stuck with the proving. As you already notice the case in which all eigenvalues are all located on the imaginary axis is a little bit more involved, because it is a special case.