Points F, E, and D are on the sides line AB, line AC, and line BC, respectively, of right triangle ABC such that AFDE is a square. If AB = 12 and AC = 8, then what is AF?

To find AF, we need to first determine the lengths of AD and AE.

Since AB and AC are the sides of the right triangle, we can use the Pythagorean theorem to find the length of BC:

BC^2 = AB^2 + AC^2
BC^2 = 12^2 + 8^2
BC^2 = 144 + 64
BC^2 = 208

Taking the square root of both sides:

BC = √208
BC ≈ 14.422

Now, let's find the ratios of BD/BC and AE/AC. Since triangle ABC is a right triangle, we can use the similarity of triangles:

BD/BC = AB/AC
BD/14.422 = 12/8
BD ≈ 21.633

AE/AC = AB/BC
AE/8 = 12/14.422
AE ≈ 6.565

Since AFDE is a square, AD = AE and AF = BD. Therefore, AF ≈ BD ≈ 21.633.

So, AF is approximately 21.633.