The shirts the group wears in Baja are almost exact copies of the uniforms from Star Trek (1966). William Shatner and Andy Griffith wear command gold, while Robert Reed has a red security shirt.
Aired the same time as The Questor Tapes, a would-be-series pilot produced by Gene Roddenberry, who went up against Captain Kirk himself, William Shatner... And Shatner won... Pray for the Wildcats garnered a big audience (and a big cult following) (Questor Tapes also has a cult following).
William Shatner's character works for Andy Griffith's character Sam Farragut. According to Operation -- Annihilate! (1967), Captain Kirk's only brother was named Sam, and according to Obsession (1967), the USS Farragut was Kirk's first assignment as a lieutenant for Starfleet.
Decades later, the cable movie White Mile starring Alan Alda, had a similar plot. An ad agency man forces his clients and employees on a dangerous river-rafting trip, where things go bad. Both Alda and here, Andy Griffith were famous for starring on a sit-com that had already run its course, The Andy Griffith Show and MASH.
When William Shatner was on The Howard Stern Show in the 1990's, his third time on the show, Stern read a rumor (one of many he was teasing him about) that Shatner said was false: that he and Angie Dickinson had an affair while working together. Shatner, for most of the interview, said he never worked with Angie, until the interview's end, where he said, "Oh, wait, we did do something together," but never mentioned the name. Ironically, in this movie, he plays a married man having an affair with Dickinson.