Suppose that R is a prime ring with Utumi quotient ring U, extended centroid C and f (xi(1),..., xi(n)) a noncentral multilinear polynomial over C. Let I be a nonzero ideal of R and char (R) not equal 2. If F, G and H are three generalized derivations of R such that F([G(f(xi)), f (xi)] = H(f(xi)(2)) for all xi = (xi(1),..., xi(n)) is an element of I-n, then one of the following holds: (1) there exist lambda, mu is an element of C and a, b is an element of U such that F(x) = mu x, G( x) = ax + xa +lambda x, H(x) = [b, x] for all x is an element of R with b - mu a is an element of C; (2) there exist lambda, mu is an element of C and a, b, q is an element of U such that F(x) = qx + xq + mu x, G(x) = ax + xa + lambda x, H(x) = [b, x] for all x is an element of R with q + alpha a is an element of C and q(2) + mu q + alpha b is an element of C for some 0 not equal = alpha is an element of C; (3) f (xi(1),..., xi(n))(2) is central valued on R and there exist lambda is an element of C, a, b, p is an element of U and a derivation d in U such that F(x) = px + d(x), G(x) = ax + xa + lambda x and H(x) = [b, x] for all x is an element of R; (4) R satisfies s(4).