Hello,
Let's n the number of student by row
Let's r the nomber of rows
Number of students in the class: n*r
n*r=(n+1)*(r-2) (1)
n*r=(n-1)*(r+3) (2)
(1)==>nr=nr+r-2n-2==> r-2n=2 (3)
(2)==>nr=nr-r+3n-3==>-r+3n=3 (4)
(3)+(4)==>n=5
(3)==>r=2+2*5==>r=12
Number of students: nr=5*12=60
60=5*12=6*10=4*15