Solve for p 31p^2+10p+1=6p^2