Hint: Using the spectral theorem, we can see that there exists a polynomial $p(t)$ such that $p(Q^2) = Q$. Think in these terms: if you had a psd matrix $Q^2$ (which you could unitarily diagonalize), how would you find its unique psd square root $Q$?
For any $x_1,y_1$, the function $p(t) = y_1$ satisfies $p(x_1) = y_1$
For any $x_1,x_2,y_1,y_2,$ there is a (unique) $p(t) = a_1t + a_0$ such that $p(x_i) = y_i$ for $i =1,2$.
For any $x_1,\dots,x_n$ and $y_1,\dots,y_n$, there is a unique polynomial $p(t)$ of degree $n-1$ such that $p(x_i) = y_i$ for $i=1,\dots,n$
There is a polynomial $p(t)$ of degree $n-1$ such that $p(\lambda_i) = \sqrt{\lambda_i}$ for $i = 1,\dots,n$.
2
Bumbble Comm
On
Since $B$ and $Q^2$ commute they have the same eigenvectors. But $Q$ has the same eigenvectors as $Q^2$ so $B$ and $Q$ commute as well.
Hint: Using the spectral theorem, we can see that there exists a polynomial $p(t)$ such that $p(Q^2) = Q$. Think in these terms: if you had a psd matrix $Q^2$ (which you could unitarily diagonalize), how would you find its unique psd square root $Q$?