The waveguide-cavity system has significant applications for sensing as well as for constructing highly integrated optical circuits. In this paper, we analyzed the mode coupling of resonant cavities integrated into a LiNbO3 rectangular subwavelength waveguide, which is able to serve as an on-chip integrated platform at terahertz frequencies. Using a time-resolved imaging method, we visualized terahertz field evolution in the waveguide-cavity structure and determined the resonant characteristics in transmission and reflection spectra. Moreover, a cavity-cavity coupling was realized, which was demonstrated by the transmission window in the transmission spectrum. We also showed that the localized fields in the cavity-cavity structure were enhanced at the transmission window. These findings would be helpful for the development of terahertz on-chip waveguide-based information processing and sensing systems.