This is a dubious claim, and a hard one to prove conclusively either way. The first trees are likely older than 350 MYA, eg Archaeopteris macilenta, which lived during the second half of the Devonian around 400 MYA. As for the first sharks, modern sharks evolved in the Jurassic, around 200 MYA. However:
Some sources extend the term "shark" as an informal category including extinct members of Chondrichthyes (cartilaginous fish) with a shark-like morphology, such as hybodonts. Shark-like chondrichthyans such as Cladoselache and Doliodus first appeared in the Devonian Period (419–359 Ma), though some fossilized chondrichthyan-like scales are as old as the Late Ordovician (458–444 Ma)
Also, prior to vascular trees evolving, there were other tree-like plants and fungi that existed on land, and also trees have evolved independently possibly hundreds of times because they are not a monophyletic clade like sharks, but are instead represented in clades across all vascular plants