We are given the circle
\[
x^2+y^2+6x-4y-3=0.
\]
The length of tangent from an external point \((x_1,y_1)\) to the circle
\[
S=0
\]
is given by
\[
\sqrt{S_1},
\]
where \(S_1\) is obtained by substituting \((x_1,y_1)\) in the equation of the circle.
Here, the external point is
\[
(5,1).
\]
So,
\[
x_1=5,\qquad y_1=1.
\]
Now substitute \(x=5\) and \(y=1\) in the circle:
\[
S_1=(5)^2+(1)^2+6(5)-4(1)-3.
\]
Now simplify step by step:
\[
S_1=25+1+30-4-3.
\]
\[
S_1=26+30-7.
\]
\[
S_1=56-7.
\]
\[
S_1=49.
\]
Therefore, the length of the tangent is
\[
\sqrt{S_1}=\sqrt{49}.
\]
\[
=7.
\]
Hence, the length of the tangent is
\[
7.
\]