In the case of whales the independent lines of evidence number nine.
1. Paleontological evidence
Scientists have identified a number of fossil creatures that make up the lineage of whale. In chronological order, these include: Sinonyx (60 million years ago), Pakicetus (52 million years ago), Ambulocetus (50 million years ago), Rodhocetus (46-7 million years ago), Basilosaurus (35-45 million years ago), Dorudon (about 40 million years ago).
As Raymond Sutera states:
... we have noted the consistent changes that indicate a series of adaptations from more terrestrial to more aquatic environments as we move from the most ancestral to the most recent species. These changes affect the shape of the skull, the shape of the teeth, the position of the nostrils, the size and structure of both the forelimbs and the hindlimbs, the size and shape of the tail, and the structure of the middle ear as it relates to directional hearing underwater and diving. The paleontological evidence records a history of increasing adaptation to life in the water - not just to any way of life in the water, but to life as lived by contemporary whales.
2. Morphological evidence
Morphology is the study of the form and structure of organisms and their specific structural features.
The study of the form and structure of the creatures described in the previous section further strengthen the view that they were ancestral to modern whales. These structures include: the anatomy of the foot of Basilosaurus allies and the "anvil" of the middle ear of Pakicetus.
3. Molecular biological evidence
Sutera explains how molecular biology can be used to determine evolutionary lineages as follows:
The hypothesis that whales are descended from terrestrial mammals predicts that living whales and closely related living terrestrial mammals should show similarities in their molecular biology roughly in proportion to the recency of their common ancestor. That is, whales should be more similar in their molecular biology to groups of animals with which they share a more recent common ancestor than to other animals that exhibit convergent similarities in morphology, ecology, or behavior.
The chart below summarises the results of such molecular biological studies.
Whales are not only related to the ungulates, they fit right in the middle of that group. This evidence not only supports the view that the ancestors of whales were terrestrial animals but also points to the animals closest to whale ancestors - hippos.
4. Vestigial evidence
Vestigial features are anatomical features that are of no use to a creature, although they take energy to maintain.
Whales have vestigial features that point clearly to their terrestrial origin. Vestigial features of modern whales include: very small pelvic and back leg bones embedded within their bodies, olfactory nerves even though whales have no sense of smell, vestiges of ears designed to hear in air and a vestigial diaphram.
5. Embryological evidence
... the embryology of the whale, examined in detail, also provides evidence for its terrestrial ancestry. As embryos no less than as adult animals, whales are junkyards, as it were, of old, discarded features that are of no further use to them. Many whales, while still in the womb, begin to develop body hair. Yet no modern whales retain any body hair after birth, except for some snout hairs and hairs around their blowholes used as sensory bristles in a few species. The fact that whales possess the genes for producing body hair shows that their ancestors had body hair. In other words, their ancestors were ordinary mammals.
6. Geochemical evidence
Like most elements, Oxygen comes in a number of different varieties, called isotopes. See this link for details. As can be seen from the article at the link, fresh water has a slightly higher concentration of lighter oxygen than does sea water. These slightly different isotopic ratios are recorded in the bones of animals, so those that drank fresh water can be differentiated from those that drank sea water. fossil teeth from the earliest whales have lower ratios of heavy oxygen to light oxygen, which shows that those animals drank fresh water. Later fossil whale teeth have higher ratios of heavy oxygen to light oxygen, indicating that they drank salt water. This absolutely reinforces the inference drawn from all the other evidence discussed here: the ancestors of modern whales adapted from terrestrial habitats to saltwater habitats by way of freshwater habitats. (Sutera)
7. Paleoenvironmental evidence
Paleoenvironmental evidence refers to the other fossils found in the same beds as the target fossil type as well as the types of rock bed that the fossils were found in. The whale ancestors that were clearly terrestrial (from their morphology) are also associated with fossils of terrestrial organisms, as well as with terrestrial rock types. The whale ancestors whose morphology shows that they were marine were assiciated with fossils of marine organisma and marine rock types.
8. Paleobiogeographic evidence
Paleobiogeographic evidence refers to the geographic distribution of fossils. We would expect that the terrestrial ancestors would have a limited geographical range, whilc later marine ancestors, who had the oceans to populate, would have a wider geographic range. The locations of the different whale ancestors follow these expectations.
9. Chronological evidence
Chronological evidence refers to the reason why whales appeared when they did.
Whales are mammals and could not have radiated before the Cretaceous–Tertiary extinction event (which happened 65 million years ago) as the seas at that time were filled with marine reptiles such as the plesiosaurs, ichthyosaurs, mosasaurs, and marine crocodile. When these fearsome predators, and many other marine creatures, went extinct there were plenty of environmental niches for whales (and other mammals) to expand into. The transition from terrestrial animals to deep-diving whales with directional underwater hearing took about 10 - 15 million years.
The evidence that whales evolved from terrestrial ancestors is supported by many mutually reinforcing, independent lines of evidence. Any attempt to discredit this conclusion has to deal with all of this independent evidence, which creationists have spectacularly failed to do.
There are two types of whale: toothed whales and baleen whales. The evidence shows that baleen whales evolved from toothed whale ancestors about 30 million years ago. Here is an article on a transitional fossil between toothed whales and baleen whales.
The five videos below together make up a fascinating documentary on the evolution of whales: