It appears you have either a (Late 2009) or a (Mid 2010) unibody MacBook both of which shipped with OSX 10.6 Snow Leopard (one with 10.6.1 and the other 10.6.3 respectively). This means your Leopard DVD will not work on either of these models. Plus the DVDs which shipped with these laptops will have gray labels and must only be used on the specific laptop (cannot be shared with any other model Mac).
First try booting into Internet Recovery Mode using Command + Option + R to see if you can access the online macOS 10.13 installer. If you can boot to the High Sierra online installer, then you will need to click "View" within Disk Utility and select "Show All Devices" so that the physical drive appears on the left pane of Disk Utility. Erase the whole physical drive as GUID partition and MacOS Extended (Journaled).
If you can still boot the laptop normally, then you can also create a bootable macOS 10.13 USB installer using the instructions in this Apple article:
How to create a bootable installer for macOS - Apple Support
If you are trying to install macOS 10.6 to 10.10, then you must partition & format the whole physical drive instead of erasing the drive. Use the instructions in this article to partition & format the drive:
https://www.owcdigital.com/assets/support/support-formatting-and-migration/Mac_Formatting_6-10.pdf
If the laptop uses a hard drive, then I highly recommend you first enable Filevault and let it completely finish encrypting the drive which may take a day to complete (assuming the drive is still healthy), otherwise your personal files can still be accessed by using a data recovery app. If the laptop contains an Apple SSD, then you don't have to enable Filevault since the data will be completely destroyed by a simple erase or partition/formatting of an Apple SSD. If the laptop is using a third party SSD, then most likely the data will be destroyed as well. Unfortunately instructions in various Apple article assume an SSD is being used or Filevault is enabled (terrible assumptions on Apple's part). FYI, here are some other things you should do before selling a Mac:
What to do before you sell, give away, or trade in your Mac - Apple Support