Given , N(h-2) = m
N(h-3) = k ;
The formula for AVL Tree Height is given as :
N(h) = N(h-1) + N(h-2) + 1 // N: # Node
Now , N(h-1) = N(h-2) + N(h-3) +1 // substitute in above equation,
N(h) = N(h-2) + N(h-3) + 1 + N(h-2) +1
N(h) = 2*N(h-2) + N(h-3) + 2
N(h) = 2m+k+2