For Keypad.h
In the IDE, sketch->include libraries->manage libraries.
In the searchbox at the top, type keypad
From the list, click the one by Mark Stanley and Alexaner Brevig
Click install
For joystick.h, it might be this one: Joystick library
Click clone or download (green button at the right) and select download zip.
Extract the files. In the extracted directory, navigate to
C:\Users\yourusername\Downloads\arduinolibs\ArduinoJoystickLibrary-master\ArduinoJoystickLibrary-master. In there you will find a directory Joystick; copy it.
Navigate to C:\Users\yourusername\Documents\Arduino\libraries and paste the copied directory.
You might have to restart the IDE after that. Now try to compile.