Hello, the definition of your function is wrong, because missing commas , I'll share it with corrections , plus a picture so you can see that actually works
a[q_ , s1_, s2_] := ((1 - q + s1*(1 + q*s2))/(1 + s2))
D[a[q, s1, s2], s1]
Here is the picture!!!!