If you'd want to use the hotspot, you will need to connect your printer to mobile hotspot from 1st device, and then use 2nd device to connect to the same hotspot and to the printer, and then it should work. Try that.
If you have only one device that is used at the same time as a mobile hotspot and for printing, it would not work.
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".