If −5 is a root of the quadratic equation 2x2+px−15=0 and the quadratic equation p(x2+x)+k=0 has equal roots, find the value of k.