the length of a plate at distance d from the first plate is c1*d (where c1 is a constant)
and you know that c=(ε0*S)/l
s= surface area of the plates
l=the distence between two plates
and you can consider all the capacitors are connected in sequece (one after another - I really don't know the...
Here's thought: The first capacitor is of length A (you neglect the extra height of the second plate), the second capacitor is the length of the second plate and soo own.
You calculate the general function for a capacitor with length d (a<d<b) and then integrate!
I think... :)