To solve the differential equation \(\frac{dy}{dx}=\frac{6}{x^2}\) with the initial condition \(y(1)=3\), proceed as follows:
First, separate the variables to integrate:
\[\int dy = \int \frac{6}{x^2} dx\]
Integrating both sides, we get:
\[y = -\frac{6}{x} + C\]
Next, use the initial condition \(y(1) = 3\) to find the constant \(C\):
\[3 = -\frac{6}{1} + C\]
Simplifying, we have:
\[3 = -6 + C\]
Thus, \(C = 9\).
The particular solution is:
\[y = 9 - \frac{6}{x}\]
The correct answer is \(y=9-\frac{6}{x}\).