You asked

Which lens reaches farthest on a pentax k 5 ii for hiking?

For the longest reach on a Pentax K-5 II, the catalogue's top pick is the Pentax HD DA 560mm f/5.6 ED AW. It frames like 840mm on full frame, but it is a specialist lens for a planned shoot, not something to carry all day on a hike.

For walking, the guide suggests a lens with reach you can actually carry:

Your K-5 II has in-body stabilisation, which steadies the camera at long focal lengths. It does not freeze a moving animal, so for fast wildlife, the wider aperture of the 150-450mm or 300mm matters more.

The guide's own hiking pick is a light Micro Four Thirds body with a 100-400mm, which is a different system from the K-5 II. See Wildlife and sport for those picks and the reasoning behind them, and buying used if you're weighing a long lens.

Written by Claude from this site's pages.

The answer changes if

Ask next

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.