Solve in positive integers the following equation $$\left [\sqrt{1}\right]+\left [\sqrt{2}\right]+\left [\sqrt{3}\right]+\ldots+\left [\sqrt{x^2-2}\right]+\left [\sqrt{x^2-1}\right]=125,$$ where $[a]$ is the integer part of the real number $a$.
1. **Understanding the Problem:**
   We need to solve the equation 
   \[
   \left \lfloor \sqrt{1} \right \rfloor + \left \lfloor \sqrt{2} \right \rfloor + \left \lfloor \sqrt{3} \right \rfloor + \ldots + \left \lfloor \sqrt{x^2-2} \right \rfloor + \left \lfloor \sqrt{x^2-1} \right \rfloor = 125,
   \]
   where $\left \lfloor a \right \rfloor$ denotes the integer part of the real number $a$.

2. **Grouping Terms:**
   For any integer $n$, the set $S_n = \{ t : n^2 \le t < (n+1)^2 \}$ contains all integers $t$ such that $\left \lfloor \sqrt{t} \right \rfloor = n$. The size of this set is $|S_n| = (n+1)^2 - n^2 = 2n + 1$.

3. **Summing the Contributions:**
   Each $n$ contributes $n$ to the sum for each element in $S_n$. Therefore, the total contribution of $n$ is $n \cdot |S_n| = n \cdot (2n + 1)$. The sum we need to evaluate is:
   \[
   \sum_{n=1}^{x-1} n(2n+1).
   \]

4. **Simplifying the Sum:**
   We need to find $x$ such that:
   \[
   \sum_{n=1}^{x-1} n(2n+1) = 125.
   \]
   Let's expand and simplify the sum:
   \[
   \sum_{n=1}^{x-1} n(2n+1) = \sum_{n=1}^{x-1} (2n^2 + n).
   \]
   This can be split into two separate sums:
   \[
   \sum_{n=1}^{x-1} 2n^2 + \sum_{n=1}^{x-1} n.
   \]

5. **Evaluating the Sums:**
   Using the formulas for the sum of squares and the sum of the first $k$ integers:
   \[
   \sum_{n=1}^{k} n^2 = \frac{k(k+1)(2k+1)}{6},
   \]
   \[
   \sum_{n=1}^{k} n = \frac{k(k+1)}{2}.
   \]
   We substitute $k = x-1$:
   \[
   \sum_{n=1}^{x-1} 2n^2 = 2 \cdot \frac{(x-1)x(2x-1)}{6} = \frac{(x-1)x(2x-1)}{3},
   \]
   \[
   \sum_{n=1}^{x-1} n = \frac{(x-1)x}{2}.
   \]

6. **Combining the Results:**
   Adding these two results together:
   \[
   \sum_{n=1}^{x-1} (2n^2 + n) = \frac{(x-1)x(2x-1)}{3} + \frac{(x-1)x}{2}.
   \]
   Finding a common denominator:
   \[
   \frac{(x-1)x(2x-1)}{3} + \frac{(x-1)x}{2} = \frac{2(x-1)x(2x-1) + 3(x-1)x}{6} = \frac{(x-1)x(4x-2 + 3)}{6} = \frac{(x-1)x(4x+1)}{6}.
   \]

7. **Setting the Equation:**
   We need this to equal 125:
   \[
   \frac{(x-1)x(4x+1)}{6} = 125.
   \]
   Multiplying both sides by 6:
   \[
   (x-1)x(4x+1) = 750.
   \]

8. **Solving the Cubic Equation:**
   We test integer values for $x$:
   - For $x = 6$:
     \[
     (6-1) \cdot 6 \cdot (4 \cdot 6 + 1) = 5 \cdot 6 \cdot 25 = 750.
     \]
   This satisfies the equation.

The final answer is $\boxed{6}$.