If you're curious about the mathematics of triangulation (it's much simpler), you can read about it here: https://en.wikipedia.org/wiki/Triangulation#Distance_to_a_point_by_measuring_two_fixed_angles .
A combination of trilateration and triangulation is triangulateration, used in surveying...