Transport equation on a finite domain. II. Reduction to X- and Y-functions