A factorized finite-difference scheme for numerical approximation of initial-boundary value problem for two-dimensional subdiffusion equation in nonhomogeneous media is proposed. Its stability and convergence are investigated. The corresponding error bounds are obtained.