Application of the Alt-Grassberger-Sandhas equations to the three-alpha model