I wanted to reformat by flash drive using my program. I use the flash drive on both Mac and Windows. After using the flash drive on Mac I inserted the flash drive in my Windows computer and saw some hidden files and folders called "._.Trashes" and more. Are these safe to delete and will the flash drive be usable?
Totally safe to delete, and doesn't affect the flash drive.
macOS utilizes hidden files for a lot of different purposes, unique to macOS. They won't hurt anything to find and delete them on macOS, either
Here is a link about all of the different hidden files macOS uses: http://www.westwind.com/reference/OS-X/invisibles.html