This paper mainly studies the problem of solving a class of first-order nonlinear non-homogeneous ordinary differential equations with variable coefficients, which can be transformed into solvable second-order linear homogeneous variable coefficient ordinary differential equations using elastic transformation. Firstly, the paper uses elastic transformation to upgrade a class of first-order nonlinear non-homogeneous variable coefficient ordinary differential equations to second-order linear homogeneous variable coefficient ordinary differential equations, and then the general solution expression of this first-order differential equation is obtained by using the general solution of the second-order linear homogeneous ordinary differential equation with variable coefficients, elastic transformation and related operation rules. Secondly, according to the solving process of first-order nonlinear non-homogeneous ordinary differential equations with variable coefficients, the steps for solving such differential equations are summarized. Finally, examples are given to prove that it is effective, simple and feasible to solve the first-order nonlinear non-homogeneous ordinary differential equation with variable coefficients by elastic transformation. The research in this paper provides a new idea for solving a class of first-order nonlinear non-homogeneous ordinary differential equations with variable coefficients.