Simulations predict perfect phasematching for difference frequency generation (DFG) in a nonlinear ridge waveguide. It makes use of InGaAsP lattice-matched to InP as a nonlinear ridge waveguide. Both crystals possess high second-order susceptibility χ(2) and low loss, making them ideal for second-order nonlinear effects. The design allows two lasers in the telecom spectrum to interact in the nonlinear waveguide and emit in the mid-infrared (mid-IR). The InGaAsP ridge waveguide heterogeneously integrated on silicon-rich silicon nitride achieves phase-matching, resulting in a conversion efficiency η = 4.5 %/W.