Galerkin approximation for inverse problems for nonautonomous nonlinear distributed systems