Abstract: Two sub-Riemannian metrics are called projectively equivalent if they have the same geodesics up to a reparameterization and affinely equivalent if they have the same geodesics up to affine reparameterization. In the Riemannian case both equivalence problems are classical: local classifications of projectively and affinely equivalent Riemannian metrics were established by Levi-Civita in 1898 and Eisenhart in 1923, respectively. In particular, a Riemannian metric admitting a nontrivial (i.e. non-constant proportional) affinely equivalent metric must be a product of two Riemannian metrics i.e. certain separation of variable occur, while for the analogous property in the projectively equivalent case a more involved (``twisted") product structure is necessary. The latter is also related to the existence of sufficiently many commuting nontrivial integrals quadratic with respect to velocities for the corresponding geodesic flow. We will describe the recent progress toward the generalization of these classical results to sub-Riemannian metrics. In particular, we will discuss genericity of metrics that can uniquely, up to a constant multiple, be recovered from the knowledge of their geodesics as unparametrized curves and the separation of variables phenomenon on the level of linearization of geodesic flows (i.e. on the level of Jacobi curves) for metrics that admit non-constantly proportional affinely equivalent metrics. The original motivation for this type of problems comes by a widely accepted opinion in Neuroscience that typical human movements optimality certain cost, so the original question is how to recover this cost from the sufficient big collection of typical movements. Although the model describing human movements are not sub-Riemannian, the sub-Riemannian setting seems to be an interesting and rich case study. The talk is based on the collaboration with Frederic Jean (ENSTA, Paris) and Sofya Maslovskaya (INRIA, Sophya Antipolis).