In this research, we have proposed a new technique to solve two-dimensional (2D) viscous fluid flow among slowly expanding or contracting walls. The new technique depends on combining the algorithms of Yang transform and the homotopy perturbation methods. The results, obtained from the first iteration and by using the new method, show the accuracy and efficiency of this method compared to the other methods, used to find the analytical approximate solution for the problem caused by the 2D viscous fluid flow. Moreover, the graphs of the new solutions show the validity, usefulness and necessity of the new method.