Does the Pages content export to PDF and view correctly in Quick Look or Preview?
You realize that you cannot insert an image into a Pages header, it will only float over that heading? Select the image and from the Arrange panel, choose Text Wrap : None. That likely will not fix the printing problem with that HP OfficeJet 5258 All-in-one printer. That printer when networked via Wi-Fi or Ethernet cable is supported by Apple's built-in AirPrint and requires no HP drivers.
I suggest that if you haven't that you configure that printer as networked, and in System Preferences : Printers & Scanners panel, you right-click on that printer entry and choose Reset Print system… and click Reset on the challenge Are you sure dialog. That will remove the HP printer entry and now you can click the + symbol to add a printer.
With your OfficeJet networked, a new panel will appear where Apple's Bonjour service has detected your printer. In this example, it detected my Samsung Laser printer. It is important to select the printer entry so that the Use selector automatically assigns the printer with an AirPrint driver:
Once you have added the HP OfficeJet back to the Printers panel, right-click on it and choose Set Default printer. Now, open that Pages document that was giving you issues earlier and see if it prints normally. If it still does not print correctly, I would clean the print heads and determine if HP has added firmware to mess up printing if you are not using original HP replacement cartridges.
Just to add, because Pages is not a Word clone, it must translate any Word content opened in it to the Pages internal document format and Apple has never guaranteed that to be an accurate or infallable process.