Let $X, Y$ and $Z$ be any three finite dimensional vector spaces s.t. $X$ and $Y$ have the same dimension. Now, let assume there exists a natural isomorphism between $Hom(X, Z)$ and $Hom(Y, Z)$ (i.e., $Hom(X, Z) cong Hom(Y, Z)$). What can be conclude on $X$ and $Y$?

Does it imply that $X cong Y$, i.e., there exists a natural isomorphism between them?

I encounter this in a proof showing that $(U otimes V) otimes W cong U otimes (V otimes W)$.

I can derive all the details showing that $Hom ((U otimes V) otimes W, Z) cong Hom( U otimes (V otimes W), Z)$. Unfortunately, I cannot derive the final step.