Quantum few-body problem with internal structure. II. Three-body problem