If roots of the quadratic equation are real, then discriminant is always be greater than equal to zero.
Given equation is x2+px+4p+21=0
Since roots are real, therefore discriminant ≥0 ⇒p2−4(4p+21)≥0 ⇒p2−p−2≥0 ⇒(p−2)(p+1)≥0 ⇒p≥2 or p≤−1
Since, it is given 0≤p≤5, so we neglect p≤−1.
The possible values of p are 2, 3, 4, 5 ∴ Required probability =64=32