Both have pros and cons. TG-5 has an excellent macro mode, but its sensor is small, its lens has only two aperture settings (f/2.8 and f/8, I believe), and a limited control set - for instance, it does not allow you to control shutter speed. DC2000 has a much larger 1" sensor (the same, as far as I know, as Sony RX100M3) and a full set of controls, but its lens is fixed focal length (i.e. no zoom capability) necessitating the use of add-on lenses for wide-angle and macro shots, and while it's capable of shooting RAW (a highly desirable characteristic for underwater photography), it takes several seconds to write each RAW file. Both are waterproof only to 15-18 meters, requiring a housing for most dives, which makes them not particularly different in that regard from non-waterproof compacts. The waterproofing can come in handy in case of a housing flood, but vacuum systems are quite effective at preventing those from happening in the first place. You can use them bare while snorkeling, or on shallow dives, but bear in mind that they use very thin and fragile o-rings to maintain their seals, which makes them more prone to flooding than a normal housing.
For an alternative, you can look at Sony RX100 series. The M5 model is one of the very few compacts to offer phase-detection autofocus, and the release of M5A and M6 models has depressed its price on the used market to sensible levels. It's still more expensive than DC2000 or TG-5, but you also get access to a free version of Capture One Express for Sony, whereas with other cameras you'd need to pay $10/month to Adobe for Lightroom CC, or $300 once to Phase One for Capture One Pro. Besides PDAF, RX100 will give you a full set of controls, 24fps burst rate, 4K video, etc, etc. Housings are available from Sony, Meikon, Fantasea, Ikelite, Recsea, Nauticam and others. You could find a good deal on a used package (camera + housing + accessories) if you shop around. It's more camera than a beginner needs, strictly speaking, but it definitely has room to grow into.