Extending an HDMI port or Display cable?
Since the issue is a horizontal port which would cause issues fitting in a case, there are only a few solutions.


Replace the connector with a right angle one with the same foot print. Highly unlikely.
Extend the connector with some wire. This may leave it fragile. Delicate soldering skills required. Be prepared for solder bridges. May result in errors and lower bandwidth.
Solder a cut cable directly to it, removing the connector completely. May be fragile, May also result in errors and lower bandwidth. Same soldering issues as 2.
If the video input board is separate from the display controller board, extend that cable instead.
Simplest solution, use a right angle adapter or cable with a right angle connector. This is a plug and play solution, and may only add 0.5 to 1 inch, not 3 inches. If you need more, then you can crack the plastic open. Or use a FPC version like https://www.ebay.com/i/262114109807 can't vouch for the quality but it has no depth beyond the connector and pcb.


Alternatively, use a display directly from the RPi's LVDS interface, bypassing HDMI.

You mention a display cable, likely the flat FPC that goes to the display internally. That is even harder to modify properly.