To find lca(u, v), look at the range in the Euler tour between first[u] and first[v]. The node with minimum depth in that range is the LCA. Why?
The Euler tour visits every node on the path between u and v. Since you write nodes multiple times (on entry and exit), the path appears as a contiguous segment. The shallowest node in that segment is the lowest common ancestor.
This converts LCA into a Range Minimum Query problem. You need the minimum depth value in a range of the tourDepth array. RMQ has efficient solutions (sparse table, segment tree), so solving RMQ solves LCA. The reduction is clean: a complex tree query becomes a simple array query. This is why Euler tour is so effective.