The paper concerns the inverse problem of calculus of variations for one class of elliptic and hyperbolic quasilinear second order equations with two independent variables. The equations of this class have a rather wide range of applications, among which are modeling of a two-conductor transmission line, motion of a hyperelastic homogeneous rod whose cross-sectional area varies along the rod, vibration of a string, wave propagation in a bar of elastic–plastic material, and isentropic flows of a compressible gas with plane symmetry.A constructive solution of the problem in hand is given and themcorresponding Lagrangians are explicitly constructed.