Let $ABC$ be a right triangle with $\angle{ACB}=90^{\circ}$. $D$ is a point on $AB$ such that $CD\perp AB$. If the area of triangle $ABC$ is $84$, what is the smallest possible value of $$AC^2+\left(3\cdot CD\right)^2+BC^2?$$

[i]2016 CCA Math Bonanza Lightning #2.3[/i]
1. Given that $\angle ACB = 90^\circ$, triangle $ABC$ is a right triangle with $AB$ as the hypotenuse. By the Pythagorean Theorem, we have:
   \[
   AC^2 + BC^2 = AB^2
   \]

2. The area of triangle $ABC$ is given as $84$. The area can also be expressed in terms of the base and height:
   \[
   \text{Area} = \frac{1}{2} \times AC \times BC = 84
   \]
   Therefore,
   \[
   AC \times BC = 168
   \]

3. Point $D$ is on $AB$ such that $CD \perp AB$. This means $CD$ is the altitude from $C$ to $AB$. The area of triangle $ABC$ can also be expressed using this altitude:
   \[
   \text{Area} = \frac{1}{2} \times AB \times CD = 84
   \]
   Therefore,
   \[
   AB \times CD = 168
   \]
   Solving for $AB$, we get:
   \[
   AB = \frac{168}{CD}
   \]

4. We need to minimize the expression:
   \[
   AC^2 + (3 \cdot CD)^2 + BC^2
   \]
   Using the Pythagorean Theorem, we know:
   \[
   AC^2 + BC^2 = AB^2
   \]
   Substituting $AB = \frac{168}{CD}$, we get:
   \[
   AC^2 + BC^2 = \left(\frac{168}{CD}\right)^2
   \]

5. Therefore, the expression to minimize becomes:
   \[
   \left(\frac{168}{CD}\right)^2 + (3 \cdot CD)^2
   \]
   Simplifying, we get:
   \[
   \left(\frac{168}{CD}\right)^2 + 9 \cdot CD^2
   \]

6. To find the minimum value, we apply the Arithmetic Mean-Geometric Mean (AM-GM) inequality:
   \[
   \left(\frac{168}{CD}\right)^2 + 9 \cdot CD^2 \geq 2 \sqrt{\left(\frac{168}{CD}\right)^2 \cdot 9 \cdot CD^2}
   \]
   Simplifying the right-hand side, we get:
   \[
   2 \sqrt{9 \cdot \left(\frac{168}{CD}\right)^2 \cdot CD^2} = 2 \sqrt{9 \cdot 168^2} = 2 \cdot 3 \cdot 168 = 6 \cdot 168 = 1008
   \]

7. The equality in AM-GM holds when:
   \[
   \left(\frac{168}{CD}\right)^2 = 9 \cdot CD^2
   \]
   Solving for $CD$, we get:
   \[
   \left(\frac{168}{CD}\right)^2 = 9 \cdot CD^2 \implies \frac{168}{CD} = 3 \cdot CD \implies 168 = 3 \cdot CD^2 \implies CD^2 = \frac{168}{3} = 56 \implies CD = \sqrt{56}
   \]

8. Substituting $CD = \sqrt{56}$ back into the expression, we confirm that the minimum value is indeed:
   \[
   \left(\frac{168}{\sqrt{56}}\right)^2 + 9 \cdot (\sqrt{56})^2 = 1008
   \]

The final answer is $\boxed{1008}$.