Step 1: Simplify the differential equation.
The given differential equation is:
\[
x \frac{dy}{dx} = \left( \ln y - \ln x \right) y
\]
Rewrite this as:
\[
\frac{dy}{dx} = \left( \ln y - \ln x \right) \frac{y}{x}
\]
This simplifies to:
\[
\frac{dy}{dx} = \left( \ln \frac{y}{x} \right) \frac{y}{x}
\]
Step 2: Separation of variables.
Separate variables to integrate:
\[
\frac{dy}{y} = \ln \frac{y}{x} \, \frac{dx}{x}
\]
Integrating both sides:
\[
\int \frac{1}{y} \, dy = \int \ln \frac{y}{x} \, \frac{1}{x} \, dx
\]
Step 3: Use initial conditions.
We are given that \( \varphi(1) = e^2 \), which provides the necessary condition to solve for the constants.
After solving, the final solution is:
\[
\varphi(2) = 2e^3
\]
Final Answer:
\[
\boxed{2e^3}
\]