Wave packet dynamics for a system with position and time-dependent effective mass in an infinite square well