The Rays have written the book on how to build a young pitching staff, and the author of that work, executive VP of baseball operations Andrew Friedman, is impressed with the way the Mets are going about their business.

“The Mets have a tremendous amount of young talent,’’ Friedman told The Post yesterday. “I think those guys have done a tremendous job of acquiring some high-end young players that they can grow with, and I think that [front office] is extremely good at supplementing around those guys and also having enough good young depth.

“The one thing about young players is that they have tremendous upside but they also have tremendous downside. There is far from certainty from these players. For us, it’s our only way of doing business. It’s not a choice. It’s a survival mechanism.’’

The Rays are far ahead of the pack on the acquisition of young arms and the development of that talent, and once again will challenge in the AL East. David Price is coming off a Cy Young season, and the Rays’ staff is packed with young arms even after trading James Shields for top prospect Wil Myers.

The Mets are building around young pitchers Matt Harvey and Zack Wheeler and catcher Travis d’Arnaud, and acquired a power arm in Noah Syndergaard in the R.A. Dickey trade.

Here is how the Rays develop a plan for their young pitchers:

“We look at each guy independently,’’ Friedman said. “We factor in our trainer’s information, our pitching coach’s information, the repertoire, the number of pitchers per inning and for each guy we come up with an individualized plan with the idea of building them up to 200 innings consistently year after year.

“We have a three-year look, but it is really about that particular year and at the end of the year we rip it up and re-focus on another three years.’’

Ownership backs that plan, but life is getting more challenging each year.