David and Sammy had each 840 tree seedlings. David planted equal number of seedlings per row in x rows while Sammy planted equal number of seedlings in (x + 1) rows. The number of tree seedlings planted by David in each row were 4 more than those planted by Sammy in each row. Calculate the number of seedlings David planted in each row.

David: S*x=840

Sammy: (S-4)*(x+1)=840

we want to find Davids Seedlings/row, or S

Sx=(S-4)(x+1)
Sx=Sx+S-4x-4
S-4x-4=0 but S=840/x
840-4x^2-4x=0
x^2+x-210=0
factors of 210: 7,30; 14,15....
(x+15)(x-14)=0
x=14