See the number in the screen
1) you must use Product field in recipe edition and set production ratio
-ligth oil = 0.4
-Heavy oil = 0.17
-Refined = 1
2) the light oil recipe produce 40% of required gas
the Heavy oil recipe produce 17% of required ligth oil
the refine recipe produce 100% of required Heavy oil
3) the production of refine is consumed for the rest
4) when the are few products in a recipe my mod always balances the recipe