What resolution do I need to resize my image to achieve the best print quality?

And my apologies if it seems a little too basic, but I can not understand.

I have a digital image that I took with my camera. 4000×3000 pixels, and GIMP claims that its resolution is 72×72 DPI.

I would like to print a thumbnail of this image in the highest quality possible. What I have said is that the printer that will be used works optimally with images configured for 300 DPI.

In the printed document, I would like my image to be exactly 166 pixels wide, or 3.32 cm (according to Microsoft Word).

And now to the question: how to calculate how to resize my 12MP image, so when I take this image and import it into my word processor, it will eventually print at best?

My initial thought was: Since the picture on paper will eventually be 3.32 cm wide (1.31 "), I should resize my image to 300×1.31 = 393 pixels and set its DPI headers to indicate" 300×300 ".

However, I'm not at all familiar with photography in general, so I'm afraid it does not look like cheap tobacco.

Am I missing something?