This work is devoted to metric lines (isometric embedding of the real line) in metabelian Carnot groups G: we say that a group G is metabelian if $[G,G]$ is abelian. Theorems A and B provide a partial result about the classification of the metric lines in the jet-space of functions from R to R. Theorem C is a complete classification of the metric lines in the Engel type Carnot groups. Both groups are examples of metabelian Carnot groups. The main tool to classify sub-Riemannian geodesics on G is a correspondence between the regular sub-Riemannian geodesics in a metabelian Carnot group G and the space of solutions to a family of classical electromechanical systems on Euclidean space. The method to prove Theorems A, B and C is to use an intermediate (n+2)-dimensional sub-Riemannian space lying between the group G and the Euclidean space G / [G,G].