Step 1: We start with the given functional equation
\[
(f(x))^2 = \int_{0}^{x} \left( (f(t))^2 + f(t) \right) \, dt.
\]
Differentiate both sides with respect to \( x \):
\[
2f(x) \cdot f'(x) = (f(x))^2 + f(x).
\]
Simplifying, we get
\[
2f(x) \cdot f'(x) = f(x) \left( f(x) + 1 \right).
\]
Dividing both sides by \( f(x) \) (since \( f(x)>0 \) for \( x>0 \)):
\[
2f'(x) = f(x) + 1.
\]
Thus,
\[
f'(x) = \frac{f(x) + 1}{2}.
\]
Step 2: To solve this differential equation, we separate the variables:
\[
\frac{f'(x)}{f(x) + 1} = \frac{1}{2}.
\]
Integrating both sides:
\[
\int \frac{1}{f(x) + 1} \, df(x) = \frac{1}{2} \int dx.
\]
This gives
\[
\ln |f(x) + 1| = \frac{x}{2} + C.
\]
Exponentiating both sides:
\[
f(x) + 1 = e^{\frac{x}{2} + C} = A e^{\frac{x}{2}},
\]
where \( A = e^C \). Thus,
\[
f(x) = A e^{\frac{x}{2}} - 1.
\]
Step 3: Use the initial condition \( f(0) = 0 \) to find \( A \).
Substitute \( x = 0 \) into the solution:
\[
f(0) = A e^{0} - 1 = A - 1 = 0,
\]
so \( A = 1 \). Therefore,
\[
f(x) = e^{\frac{x}{2}} - 1.
\]
Step 4: Now, evaluate \( f(2) \):
\[
f(2) = e^{\frac{2}{2}} - 1 = e - 1.
\]
Since \( e \approx 2.718 \), we have
\[
f(2) \approx 2.718 - 1 = 1.718.
\]
Thus, \( 1<f(2) \leq 2 \), which corresponds to option (B).