If 3 is a root of x2+kx-24=0, it is also a root of
x2+5x+k=0
x2-5x+k=0
x2-kx+6=0
x2+kx+24=0
Equation x2+kx-24=0 has one root is 3
⇒32-3k-24=0⇒k=5
Put x=3 and k=5 in options, only option (3) gives the correct answer.