You asked

Which of the g9 and gh5 is better value used for dim interiors with the 17mm f 1 2 pro?

Here is what the site says about that.

From Panasonic Lumix GH5: Panasonic Lumix GH5: A mirrorless camera by Panasonic with a 20.3-megapixel Micro Four Thirds sensor, announced in 2017. A long-time video favourite: stabilised, 10-bit 4K, and cheap used. Specs - Maker: Panasonic - Mount: Micro Four Thirds - Sensor: Micro Four Thirds, 17.3 x 13mm, crop factor 2.0 - Resolution: 20.3 megapixels - Stabilisation: in the body - Announced: 2017 - Type: mirrorless camera Focal lengths on it Lenses frame like 2.0 times ...

From Olympus M.Zuiko 17mm f/1.2 PRO: Olympus M.Zuiko 17mm f/1.2 PRO: A prime lens by Olympus for Micro Four Thirds cameras, 17mm f/1.2. A weather-sealed f/1.2 prime, 34mm equivalent.

Quoted from this site's pages.

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}.