Composition of linear and quadratic functions: find a value