$A^k=B^k$ and $A,B$ are positive semidefinite $ \Rightarrow A = B$ Let $A,B \in {\mathbb{C}^{n \times n}}$ and $A,B$ are positive semidefinite.
If there is $k \in \mathbb{Z}$ such that $A^k=B^k$, why does $A=B$?
 A: Hint:
$A^k$ is diagonalizable since $A$ is. Thus $A^k=T\Lambda^k_a T^{-1}$ for some invertible $T$ if $A=T\Lambda_a T^{-1}$. $\Lambda_a$ is the diagonal matrix containing $A$'s eigenvalues. Now observe $B$ is diagonalizable as well and $A^k=B^k$ as per your assumption. 
A: So, okay, this will be an expansion on dineshdileep's answer, trying to puzzle all the pieces together. I will throughout assume we are working in complex spaces.
Positive semi-definite implies Hermitian
Positive semi-definite means that $x^H A x \geq 0$ for all $x \in \mathbb C^n$.
If $A$ is positive semi-definite, then $A$ is Hermitian. This is a special case of the following: If $x^HAx \in \mathbb R$ for all $x \in \mathbb C^n$, then $A$ is Hermitian. 
Proof: From the assumption we have that
$$(x+y)^HA(x+y) = (x^HAx + y^HAy) + \underbrace{(x^HAy + y^HAx)}_{=B(x,y)}$$
is real. We know that $x^HAx + y^HAy$ is real by the assumption, so $B(x,y) = x^HAy + y^HAx$ must also be real. Now we get:
$$B(e_k, e_j) = a_{kj} + a_{jk} \in \mathbb R,$$
which implies $\operatorname{Im} a_{kj} = -\operatorname{Im} a_{jk}$. We also get:
$$B(ie_k,e_j) = -ia_{kj} +ia_{jk} \in \mathbb R,$$
which implies $\operatorname{Re} a_{kj} = \operatorname{Re} a_{jk}$.
These two facts together imply $a_{kj} = \overline{a_{jk}}$, which means that $A$ is Hermitian.
Powers of positive semi-definite matrices are positive semi-definite
If $A$ is positive semi-definite, then so is $A^k$ for integers $k > 1$.
Proof: Positive semi-definite matrices can be characterized by the fact that all its eigenvalues are non-negative. Note that that if $v$ is an eigenvector of $A$ with eigenvalue $\lambda$, then $v$ is also an eigenvector of $A^k$ with eigenvalue $\lambda^k$. Hence $A^k$ will be Hermitian matrix with eigenvalues $\lambda^k \geq 0$, since $\lambda \geq 0$, so $A^k$ is positive semi-definite.
Uniqueness of $k$th roots for positive semi-definite matrices
Let $A$ be a positive semi-definite matrix. Then there exists a unique positive semi-definite matrix $B$ such that $B^k = A$.
Proof: Since $A$ is Hermitian, it can unitarily diagonalized, say $A = TDT^H$, where $D = \operatorname{diag}(\lambda_1, \dots, \lambda_n)$. Since a solution $B$ to $B^k = A$ would commute with $A$, it can be simultaneously diagonalized with $A$, so $B = TD_BT^H$, for a diagonal matrix $D_B$. From the equation $B^k = A$ we get $D_B^k = D$, from which we get $D_B = \operatorname{diag}( \sqrt[k]{\lambda_1}, \dots, \sqrt[k]{\lambda_n})$ where the $k$th roots are unique.
Comment: Let $\mu_1, \dots, \mu_n$ be the diagonal elements in $D_B$. Then we actually solve the equations $\mu_i^k = \lambda_i$ when solving for $D_B$. These equations do of course have other solutions than the non-negative ones, but if we pick any of these, then $B$ would lose the property of being positive semi-definite and/or Hermitian (Hermitian matrices only have real eigenvalues).
Final result
Let $A, B$ be positive semi-definite matrices. If $A^k = B^k$, then $A = B$.
Proof: Since $A, B$ are positive semi-definite, we know that $A^k, B^k$ are also positive semi-definite. We can thus just take the positive semi-definite square roots on both sides of $A^k = B^k$ to arrive at $A = B$.
A: Here, I am using some ideas of Calle and dineshdileep to solve your problem.
Lemma: If $A$ is a positive semidefinite Hermitian matrix and $v$ is an eigenvector of $A^k$ then $v$ is an eigenvector of $A$.
Proof: If $0<b$ is an eigenvalue of $A^k$ then $b=a^k$, for some eigenvalue $a$ of $A$. Thus, $A^k-bId=A^k-a^kId=(A^{k-1}+aA^{k-2}+\ldots+a^{k-2}A+a^{k-1}Id)(A-aId)$. Since $a>0$ and $A$ is positive semidefinite then $(A^{k-1}+aA^{k-2}+\ldots+a^{k-2}A+a^{k-1}Id)$ is positive definite. Therefore the $\ker(A^{k}-bId)=\ker(A-aId)$.
Since $\text{rank}(A^k)=\text{rank}(A)=$ number of non-null eigenvalues of $A$ then $\dim(\ker(A))=\dim(\ker(A^k))$. Since $\ker(A)\subset\ker(A^k)$ then $\ker(A)=\ker(A^k)\ \ \ \square$.
Finally, if $A^k=B^k$ and $A$ and $B$ are positive semidefinite Hermitian matrices then, by the previous lemma, the eigenvectors of $A^k=B^k$ are the eigenvectors of $A$ and $B$. Thus, we can write $A=TD_AT^{-1}$ and $B=TD_BT^{-1}$, where $D_A$ and $D_B$ are positive semidefinite diagonal matrices. So $TD_A^kT^{-1}=TD_B^kT^{-1}$, which implies $D_A^k=D_B^k$. Since $D_A$ and $D_B$ are positive semidefinite diagonal matrices then $D_A=D_B$.
