Enhancing Power-to-X hydrogen plant profitability through optimized solutions