There are two lines from the trim pump to the transom assembly. The transom assembly has a manifold where the hose should connect that can be removed externally so you can disconnect them. Under Documents of this site you can find the Mercruiser manual for you drive to see this.
1997 2400 SCR
5.7 Vortec / Bravo 2