Solutions via double wave ansatz to the 1-D non-homogeneous gas-dynamics equations