In triangle $ABC$, $\angle ABC = 90^\circ$, and point $D$ lies on segment $BC$ such that $AD$ is an angle bisector. If $AB = 60$ and $BD = 40$, then find $AC$.

Let $E$ be the foot of the altitude from $D$ to $\overline{AB},$ as shown below.

[asy]
pair A,B,C,D,E;

A=(0,48); B=(0,0); C=(64,0); D=(12.8,0); E=(12.8,19.2);

draw(A--B--C--cycle);

draw(A--D);
draw(D--E);

pair[] ps={A,B,C,D,E};

dot(ps);

label("$A$",A,NW);
label("$B$",B,SW);
label("$C$",C,SE);
label("$D$",D,S);
label("$E$",E,NE);

label("$60$",(A+B)/2,W);
label("$40$",(B+D)/2,S);
label("$x$",(A+D)/2,N);
[/asy]

It follows that, if $AD = x,$ then
\[\frac{60}{x} = \frac{64}{40}.\]Cross-multiplying gives $40x = 60 \cdot 64 = 3840,$ so $x = 96.$

By the Pythagorean Theorem on right triangle $ABD,$
\[AD = \sqrt{AB^2 - BD^2} = \sqrt{60^2 - 40^2} = \sqrt{4 \cdot 400} = 80.\]Then by the Angle Bisector Theorem, $CD = \frac{60 \cdot 40}{80} = 30,$ so $AC = AD + CD = 80 + 30 = \boxed{110}.$

Let $AC = x$. By the Angle Bisector Theorem, \[\frac{60}{40} = \frac{x}{x - 40}.\] Cross-multiplying gives $60x - 2400 = 40x$, so $20x = 2400$ and $x = \boxed{120}$.

To solve this problem, we can use the angle bisector theorem.

The angle bisector theorem states that in a triangle, if a line divides one side of the triangle into two segments of lengths $x$ and $y$, and the other two sides of the triangle are divided into segments of lengths $x'$ and $y'$, then $\frac{x}{y} = \frac{x'}{y'}$.

In triangle $ABC$, we know that $BD$ is the angle bisector of angle $B$. Let $AC = x$ and $CD = y$. We are given $BD = 40$.

Applying the angle bisector theorem to triangle $ABC$ and using the given values, we have:

$$\frac{AB}{AC} = \frac{BD}{CD}$$

Plugging in the known values, we get:

$$\frac{60}{x} = \frac{40}{y}$$

Cross-multiplying and simplifying, we have:

$$60y = 40x$$

Dividing both sides of the equation by 20, we get:

$$3y = 2x$$

Since $y = CD$ and $AC = x$, we can rewrite this equation as:

$$3 \cdot CD = 2 \cdot AC$$

We know that $AB = 60$ and $BD = 40$, which means $AD = AB - BD = 60 - 40 = 20$. Since $D$ is on segment $BC$, we have $BC = BD - CD = 40 - CD$.

Additionally, we know that $\angle ABC = 90^\circ$, so by the Pythagorean theorem, we have:

$$AD^2 + CD^2 = AC^2$$

Substituting $AD = 20$, $CD$ with $BC - BD = 40 - CD$, and simplifying, we have:

$$20^2 + (40 - CD)^2 = AC^2$$

Expanding and rearranging, we have:

$$400 + 1600 - 80CD + CD^2 = AC^2$$

Combining like terms, we have:

$$2000 - 80CD + CD^2 = AC^2$$

But we also know that $3CD = 2AC$, so we can substitute this into the equation:

$$2000 - 80 \cdot \frac{2AC}{3} + \left(\frac{2AC}{3}\right)^2 = AC^2$$

Expanding and simplifying, we have:

$$2000 - \frac{160AC}{3} + \frac{4AC^2}{9} = AC^2$$

Multiplying through by 9 to clear the fractions, we have:

$$18000 - 480AC + 4AC^2 = 9AC^2$$

Rearranging, we have:

$$9AC^2 - 4AC^2 - 480AC + 18000 = 0$$

Combining like terms, we have a quadratic equation:

$$5AC^2 - 480AC + 18000 = 0$$

To solve this quadratic equation, we can use the quadratic formula:

$$AC = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

Plugging in the values $a = 5$, $b = -480$, and $c = 18000$, we can solve for $AC$.

After solving the quadratic equation, we will find two possible values for $AC$. Select the positive value since lengths cannot be negative, and that will give you the length of $AC$.