Since it is a right triangle, one angle is obviously 90° and the sum of the other two will also be 90° (since a triangle's angles are 180°). One is X and the other is 18+X, sum both equations and equal them to 90°, and when you get X substitute in the equations
The independent variable is the variable that is being changed. In this statement, it would be water flowing flowing in the pool. The dependent variable is what is being changed so that would be the depth of the water.