Expand the brackets: 4(9p^2+12p+4)+51p+34-15=0; 36p^2+48p+16+51p+34-15=0.
Gather like terms together: 36p^2+99p+35=0. We expect this to factorise. The factors of 35 are (5,7) or (1,35).
The factors of 36 are: (1,36), (2,18), (3,12), (4,9), (6,6).
We could tabulate these factors and play them off against one another, but we already have the answer in the question: (5,7) and (3,12). These are among the sets we identified. We just check by making sure the middle term is 99p: 12p*7+3p*5=84p+15p=99p. So the answer is (12p+5)(3p+7)=0 (the factorisation in the question has a missing p). The solution is 12p+5=0, so p=-5/12 or 3p+7=0, making p=-7/3.