I will try, anyways, Hello, Marsopa56. I don't know what model of mac you have, and don't know what model of mac book your mom has, or the OS/system software either, so all I can do is give you general advice. 1st, you'll need to find the appropriate drivers/software for your printer, as this is an older printer, it might be a bit harder, but luckily I found them for you: Go here:
https://support.apple.com/kb/DL1888?viewlocale=en_US&locale=en_US
and install them. Go to system preferences, then printer and scanner, click the plus sign and add a printer. When it asks "Which One", pick the HP LaserJet 1018, and then connect via USB. If you cannot find the exact model, go for "close enough". It doesn't look like this printer supports wireless printing, so it'll have to be USB. Hp's website is no help at all, as This printer supported Mavericks and Mountain Lion which is 10.8, maybe 10.9, and nothing beyond that. Again, I know nothing. You could try GutenPrint, which is available here:
http://gimp-print.sourceforge.net/
If you go to the big Apple icon, at the top left of your screen, and the top left of your mom's screen, and then choose "About this Mac" it will tell you what OS/system software you have, and the rough model number of your Mac and your mom's Mac.
If you could post that here, it would be really helpful for me, and for anyone else who wants to try to help you, as we have no clue on anything, apart from the info you have given us
thanks
john b