Mormons do not believe in the Trinity as Christians understand it. They believe that there are many, many gods; that the Father, Son, and Holy Ghost are three gods; that they came into existence via procreation ---that is, the three gods all had parents who are gods, themselves--- and that these three gods decided to form a unity which the Mormons usually call "the Godhead".
So no, Mormon baptisms are not valid.
Baptism by virtually every other Christian ecclesial community or denomination IS valid, because except for Mormons, most other Christians share in the Catholic Church's understanding of "Trinity."
That is why any non-Catholic who is a baptized Christian that wants to become a Catholic going through RCIA is simply is “received” into the Church at Easter Sunday vigil.