If they came preinstalled, check, if the apps are listed at the App Store, when you sign in with your Apple ID and open the "Purchases" tab. If there is an "Accept" button, click "Accept". That will associate the apps with your Apple ID, and you can download them again, using your Apple ID.
But make backup copies of GarageBand and iMovie, before you delete them. If a new MacOS X version is released, you may no longer be able to restore the current versions from the App Store. Then you need your backup.
Deleting the apps will not free all space used by the apps. Most of the space is in the /Library/Audio or /Library/Application Support.
It is difficult to free the space in the User library, because other apps may also be sharing the same files.