Giving figure..
Red part is the considered element..
tan @ =(b - a ) / h =(b - r) / x... (REFER FIGURE)
Solve these two and you get r = b- (b - a)* x/h...substitute this value...
for tan@, substitute (b- a)/h...
.
.
I think that should clear it...
if there's still some doubt, temme,i'll show d integration..
do rate if it helped!