We present a general approach for numerical mode analysis of the multilayer slab waveguides using the Transfer Matrix Method (TMM) instead of the Finite Difference Frequency Domain (FDFD) method. TMM consists of working through the device one layer at a time and calculating an overall transfer matrix. Using the scattering matrix technique, we develop the proposed method for multilayer structures. We find waveguide modes for both passive and active slabs upon determinant analysis of the scattering matrix of the slab. To do this, we enhance the formulation of spatial scattering matrix to reach spatiotemporal scattering matrix. Our proposed technique is more efficient and faster than other numerical methods. Simulation results show either the spatial modes of inactive and hybrid spacetime modes of active planar waveguide. Also, spacetime wave packets can be seen using plane wave injection into the time-dependent slab waveguide instead of previously reported diffraction-free wave packets which have been obtained using the multifrequency input injection into the un-patterned inactive slab waveguides.