$p$ = Path difference
$r$ = Distance travelled by the rays
$x$ = Perpendicular distance between interference of the rays to the medium point of the incident rays
$a$ = Vertical distance between the incident rays
$D$ = Horizontal distance
I knew that
$r_2-r_1 = p \tag{1} $
$r_1^2 = D^2+(x-a/2)^2 \tag{2}$
$r_2^2 = D^2+(x+a/2)^2 \tag{3}$
$(3)-(2) = r_2^2-r_1^2 = (r_2-r_1)(r_2+r_1)=2ax \tag{4}$
$(4) = (r_2-r_1)(r_2+r_1) = 2pD \tag{5}$
$$(4) = (5) = 2pD = 2ax$$
Hence path difference $p =ax/D$
The question is why $(r_2+r_1) = 2D$ ?