In this paper, we study the problem for a nonlinear hyperbolic Stokes system of the second order with an integral term.Sufficient conditions for the uniqueness of the weak solution of this problem are found in a bounded domain. The nonlinear term of the system contains a variable exponent of nonlinearity, which is a function of spatial variables.The problem is studied in ordinary Sobolev spaces and generalized Lebesgue spaces, which is quite natural in this case.