n^n^n^n^n^n is an upper bound for general n, but the special case of only 2 people can be done with just 1 query.
the algorithm is just to have person A cut into two equal slices and then person B choose their favorite slice. it takes just 1 second, which is quite a speedup over the upper bound...