Solution (source code)

= Solution

An isometry preserves both foliations. Independence makes their level curves transverse near $x$, so their pair of values gives local coordinates. The isometry fixes the intersection corresponding to every pair of nearby values, hence fixes every point in a sufficiently small neighbourhood.