In this paper we solve the equation f (g(x)) = f (x)h m (x) where f (x), g(x) and h(x) are unknown polynomials with coefficients in an arbitrary field K, f (x) is nonconstant and separable, deg g 2, the polynomial g(x) has non-zero derivative g ′ (x) = 0 in K[x] and the integer m 2 is not divisible by the characteristic of the field K. We prove that this equation has no solutions if deg f 3. If deg f = 2, we prove that m = 2 and give all solutions explicitly in terms of Chebyshev polynomials. The diophantine applications for such polynomials f (x), g(x), h(x) with coefficients in Q or Z are considered in the context of the conjecture of Cassaign et. al on the values of Louiville's λ function at points f (r), r ∈ Q.