Step 1: Assume intercept form of the line.
Let the line cut the axes at
\[
A(a,0), \quad B(0,b)
\]
So, the equation of the line is
\[
\frac{x}{a} + \frac{y}{b} = 1
\]
Step 2: Use the section formula.
The point \(P(5,6)\) divides \(AB\) internally in the ratio \(3:1\).
Using the section formula:
\[
P\left(\frac{3\cdot 0 + 1\cdot a}{3+1},\; \frac{3\cdot b + 1\cdot 0}{3+1}\right)
= \left(\frac{a}{4},\frac{3b}{4}\right)
\]
Step 3: Equate coordinates.
\[
\frac{a}{4} = 5 \Rightarrow a = 20
\]
\[
\frac{3b}{4} = 6 \Rightarrow b = 8
\]
Step 4: Write the equation of the line.
\[
\frac{x}{20} + \frac{y}{8} = 1
\]
Multiplying throughout by \(40\):
\[
2x + 5y = 40
\]