Train $\text{T}$ leaves station $\text{X}$ for station $\text{Y}$ at $3$ pm. Train $S$, traveling at three quarters of the speed of $\text{T}$, leaves $\text{Y}$ for $\text{X}$ at $4$ pm. The two trains pass each other at a station $\text{Z}$, where the distance between $\text{X}$ and $\text{Z}$ is three-fifths of that between $\text{X}$ and $\text{Y}$. How many hours does train $\text{T}$ take for its journey from $\text{X}$ to $\text{Y}$?