We calculate the effect of finite disc thickness on the structure and stability of a differentially rotating three-dimensional spiral galaxy with stars and gases. The problem is solved exactly in terms of the rigorous mathematical method of Green function