This is not a quadratic problem; to be a quadratic, you need a squared term.
Did you mean to write: 6p² + 31p + 5 = 0 ?
If so, a = 6 b = 31 c = 5
p = ( -b ± √( b² -4ac) ) / (2a)
p = ( -31 ± √( 31² -4·6·5) ) / (2·6)
If you need help simplifying this, write back.