Let $G$ be one of the Artin groups of finite type ${\mathbf B}_n={\mathbf C}_n$, and affine type $\tilde{\mathbf A}_{n-1}$ and $\tilde{\mathbf C}_{n-1}$. In this paper, we show that if $\alpha$ and $\beta$ are elements of $G$ such that $\alpha^k=\beta^k$ for some nonzero integer $k$, then $\alpha$ and $\beta$ are conjugate in $G$. For the Artin group of type $\mathbf A_n$, this was recently proved by J. Gonz\'alez-Meneses. In fact, we prove a stronger theorem, from which the above result follows easily by using descriptions of those Artin groups as subgroups of the braid group on $n+1$ strands. Let $P$ be a subset of $\{1,...,n\}$. An $n$-braid is said to be \emph{$P$-pure} if its induced permutation fixes each $i\in P$, and \emph{$P$-straight} if it is $P$-pure and it becomes trivial when we delete all the $i$-th strands for $i\not\in P$. Exploiting the Nielsen-Thurston classification of braids, we show that if $\alpha$ and $\beta$ are $P$-pure $n$-braids such that $\alpha^k=\beta^k$ for some nonzero integer $k$, then there exists a $P$-straight $n$-braid $\gamma$ with $\beta=\gamma\alpha\gamma^{-1}$. Moreover, if $1\in P$, the conjugating element $\gamma$ can be chosen to have the first strand algebraically unlinked with the other strands. Especially in case of $P=\{1,...,n\}$, our result implies the uniqueness of root of pure braids, which was known by V. G. Bardakov and by D. Kim and D. Rolfsen.