Collinear solution to the three-body problem under a scalar-tensor gravity