Initial idea is to use euclidean distances. But I do not understand how should I solve this task. Does anyone have some hints on how to approach this?
The least-squares error is obviously the sum of the squares of the differences between the computed distances from the estimated point to the bases, and the measured distances.
Now you can implement Levenberg-Marquard to minimize this objective function.
Hint: for a good initial approximation, you can solve the problem for two bases, as there is a closed-form solution. There will be two solutions, and you can discriminate using the distance to the third base.