In Optics, Hecht, the author states that the perfect surface for a lens shape will be a hyperbola.
He essentially derives this answer by writing the optical path length from $F_1$ to $A$, then $A$ to $D$, and putting the condition that the sum of this path length must be constant, from which we get this equation.

I can hand derive and confirm that this equation leads to a hyperbola. However, I believe the main property of a hyperbola is that the difference between the distance of a point from $F_1$ and $F_2$ is always constant, taking the value of $2a$. I'm confused how the above equation and this standard definition of hyperbola correspond.

A hyperbola can also be described by the directrix property. If $H$ is the projection of $A$ on the directrix relative to $F_2$, we have: $$ F_2A=eAH, $$ where $e=n_t/n_i$ is the eccentricity of the hyperbola. Combining that with $$ F_1A-F_2A=2a, $$ where $2a=F_1F_2/e$ is a constant, we get: $$ F_1A=eAH+2a. $$ If now $DD'$ is a line parallel to the directrix, if $A$ lies between $DD'$ and the directrix and $D$ is the projection of $A$ on $DD'$, we have $AH=DH-AD$. The above equation can then be rewritten as: $$ F_1A=e(DH-AD)+2a=eDH-eAD+2a. $$ But $eDH+2a$ is a constant not depending on the position of $A$, because $DH$ is the fixed distance between line $DD'$ and the directrix. Hence we obtain the stated result: $$ F_1A+eAD=eDH+2a=\text{constant}. $$