# Box operator in FLRW metric

Definition of box operator in curved space time is $$g^{\mu \nu}\partial_{\mu}\partial_{\nu}$$ and in FLRW metric $$g_{\mu \nu}$$ is $$diag(1 ,-a^2(t)$$ $$,-a^2(t),-a^2(t) )$$ so the box operator should be $$\partial^2_t- a^{-2}(t)(\partial^2_x+\partial^2_y+\partial^2_z)$$ but according to the book of David Toms QFT in curved spacetime the box operator should be $$a^{-3}\partial_t(a^3\partial_t...)-a^{-2}(\partial^2_x+\partial^2_y+\partial^2_z)...$$

So basically my first term is not matching, can anyone tell me where am I making the mistake? Also he is using the signature $$(+- - - )$$.

Because the definition of box operator is $$g^{\mu \nu} \nabla_\mu \nabla_\nu$$ and not $$g^{\mu \nu} \partial_\mu \partial_\nu$$. You need to use covariant derivatives instead of partial derivatives. You will then get extra contributions from Christoffel connection.
If you take the scalar field in the curved spacetime the action is, $$$$S=\int d^4x\sqrt{-g}\Big(g^{\mu\nu}\partial_\mu\phi\partial_\nu\phi-m^2\phi^2\Big)$$$$ Now the trick is that when you integrate by parts the term with the variation $$\partial_\mu\delta\phi$$ the factor $$\sqrt{-g}$$ gets inside the derivative. So the resulting equation of motion is, $$$$\frac{1}{\sqrt{-g}}\partial_\mu\Big(\sqrt{-g}g^{\mu\nu}\partial_\nu\phi\Big)+m^2\phi=0$$$$
Now, why this equation is much better than yours? The simple derivative of a scalar is covariant. However $$\partial_\mu\phi$$ is no longer a scalar but a vector and its simple derivative is not covariant. So your equation will take the different form if you change the coordinates. In contrast the correct one is nothing else than, $$$$\nabla_\mu\nabla^\mu\phi+m^2\phi=0$$$$ and thus is covariant with respect to the coordinate transformations
Edit: note that you can write the box operator as follows: $$\nabla_{\mu}\nabla^{\mu}\phi=\frac{1}{\sqrt {-g}}\partial_{\mu}(\sqrt {-g}\partial^{\mu}\phi)$$