Concept:
The scalar projection of vector \(\vec a\) on vector \(\vec b\) is given by:
\[
\text{Projection of }\vec a\text{ on }\vec b
=
\frac{\vec a\cdot\vec b}{|\vec b|}
\]
where:
\[
\vec a\cdot\vec b
=
a_1b_1+a_2b_2+a_3b_3
\]
and
\[
|\vec b|
=
\sqrt{b_1^2+b_2^2+b_3^2}
\]
Step 1: Compute the dot product.
Given:
\[
\vec a=(5,1,\lambda)
\]
and
\[
\vec b=(2,6,3)
\]
Thus,
\[
\vec a\cdot\vec b
=
5(2)+1(6)+\lambda(3)
\]
\[
=
10+6+3\lambda
\]
\[
=
16+3\lambda
\]
Step 2: Find the magnitude of \(\vec b\).
\[
|\vec b|
=
\sqrt{2^2+6^2+3^2}
\]
\[
=
\sqrt{4+36+9}
\]
\[
=
\sqrt{49}
\]
\[
=7
\]
Step 3: Use the projection formula.
Given projection \(=4\),
\[
\frac{16+3\lambda}{7}=4
\]
Multiply both sides by \(7\):
\[
16+3\lambda=28
\]
\[
3\lambda=12
\]
\[
\lambda=4
\]
Hence,
\[
\boxed{4}
\]
Therefore the correct answer is:
\[
\boxed{(B)\ 4}
\]