Let the number of students in each row be x, and number of rows be y.
Total number of students =xy
From the first condition, we get
(x−3)(y+10)=xy
xy+10x−3y−30=xy
10x−3y=30...........(i)
From the second condition we get
(x+5)(y−10)=xy
xy−10x+5y−50=xy
−10x+5y−50=0
∴ −10x+5y=50..........(ii)
Adding equations (i) and (ii)
10x−3y=30
−10x+5y=50
---------------------
2y=80
y=40
Substituting y=40 in equation (ii) we get
−10x+5y=50
−10x+5×40=50
−10x+200=50
∴ −10x=50−200
∴ −10x=−150
∴ 10x=150
∴ x=15
The number of students =xy
=15×40
=600
Total number of students participating in the drill are 600