Question:
In right triangle $ABC$, we have $\angle BAC = 90^\circ$ and $D$ is on $\overline{AC}$ such that $\overline{BD}$ bisects $\angle ABC$. If $AB = 12$ and $BC = 15$, then what is $\cos \angle BDC$?

Answer:
[asy]

pair A,B,C,D;

A = (0,0);

B = (0,12);

C = (9,0);

D = (4,0);

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

draw(rightanglemark(D,A,B,20));

label("$A$",A,SW);

label("$B$",B,N);

label("$D$",D,S);

label("$C$",C,SE);

[/asy]

Since  $\cos (180^\circ - x) = -\cos x$ for any angle, we have $\cos\angle BDC = -\cos\angle BDA$.

From the Pythagorean Theorem, we have $AC = \sqrt{BC^2 - BA^2} = 9$.  Applying the Angle Bisector Theorem to $\overline{BD}$, we have $\frac{AD}{DC} = \frac{AB}{BC} = \frac{4}{5}$.  Since $AD+DC =AC = 9$ and $\frac{AD}{DC} = \frac45$, we have $AD = 4$ and $DC = 5$.

Applying the Pythagorean Theorem to $\triangle ABD$ gives $BD = \sqrt{AB^2 + AD^2} = \sqrt{144+16} = 4\sqrt{10}$, so $$\cos BDC = -\cos BDA = -\frac{AD}{BD} = - \frac{4}{4\sqrt{10}} =-\frac{1}{\sqrt{10}} = \boxed{-\frac{\sqrt{10}}{10}}.$$