Concept:
In three-dimensional coordinate geometry, the foot of the perpendicular from a point to a coordinate axis is obtained by retaining the coordinate corresponding to that axis and making the remaining two coordinates zero.
If two vectors are known, the angle between them can be calculated using the dot-product formula
\[
\cos\theta=
\frac{\vec u\cdot\vec v}
{|\vec u||\vec v|}.
\]
This formula is one of the most important tools in vector geometry.
Step 1: Determine the coordinates of \(A\), \(B\), and \(C\).
The given point is
\[
P=(3,4,5).
\]
The foot of the perpendicular on the \(X\)-axis is
\[
A=(3,0,0).
\]
The foot of the perpendicular on the \(Y\)-axis is
\[
B=(0,4,0).
\]
The foot of the perpendicular on the \(Z\)-axis is
\[
C=(0,0,5).
\]
Step 2: Find vectors \(AB\) and \(AC\).
\[
\overrightarrow{AB}
=
(0-3,\;4-0,\;0-0)
=
(-3,4,0).
\]
Similarly,
\[
\overrightarrow{AC}
=
(0-3,\;0-0,\;5-0)
=
(-3,0,5).
\]
Step 3: Calculate the dot product.
\[
\overrightarrow{AB}\cdot\overrightarrow{AC}
=
(-3)(-3)+(4)(0)+(0)(5).
\]
\[
=9.
\]
Step 4: Find the magnitudes.
\[
|\overrightarrow{AB}|
=
\sqrt{(-3)^2+4^2+0^2}
=
\sqrt{25}
=
5.
\]
Also,
\[
|\overrightarrow{AC}|
=
\sqrt{(-3)^2+0^2+5^2}
=
\sqrt{34}.
\]
Step 5: Apply the angle formula.
\[
\cos\theta
=
\frac{9}{5\sqrt{34}}.
\]
But the question states
\[
\cos\theta
=
\frac{9}{a}.
\]
Therefore,
\[
a=5\sqrt{34}.
\]
Step 6: Final Conclusion.
\[
\boxed{a=5\sqrt{34}}
\]
Hence the correct answer is
\[
\boxed{\text{Option (A)}}.
\]