The 2D Magnetohydrodynamics Stokes flow equations are solved in a lid-driven cavity and backward-facing step channel in the presence of a uniform magnetic field with different orientations. The hydrodynamic and electromagnetic equations are solved simultaneously using Stokes approximation in terms of velocity, pressure, stream function and vorticity with an iterative procedure. The radial basis function approximations are used to terms other than diffusion satisfying the boundary conditions at the same time, and obtaining not only the particular solution but the solution itself. It is found that as the strength of the applied magnetic field increases, boundary layers are formed close to the moving lid and in the separation region of main and secondary flows in the lid-driven cavity. In the step flow, an increase in Hartmann number causes the enlargement of recirculation flow in front of the step and the fully developed flow after the step when magnetic field applies horizontally, whereas y-direction magnetic field helps to diminish this recirculation. Pressure increases in the channel with increasing magnetic effect. The solution is obtained easily in a considerably low-computational cost through the use of radial basis function approximation.