The two objectives you have are not possible to achieve as such using a MIDI adapter cable.
The MIDI adapter cables carries a digital protocol with information such as note on/off with notes, velocity, etc., pitch bends, patch changes, etc. No analog waveforms or other representations of actual sounds are sent over MIDI.
Therefore transferring actual sounds from Garageband to the keyboard's speakers is not possible - and similarly recording the sounds made by your keyboard into a Garageband audio track is also not possible.
If you want to achieve those objectives, you'll need instead to purchase analog audio cables and a audio recording interface for the iPad - or use the 3.5" input (not that well suited).
What you can achieve with the MIDI adapter is to use a MIDI-compatible app to send out MIDI notes to the keyboard which can then play its own sounds through its speakers.
Similarly you can record MIDI notes from the keyboard into an instrument track in a MIDI-compatible app. However, when playing it back, the audio will come out through the keyboard's speakers - and the keyboard will need to be connected to playback the track.
Alternatively you can use GarageBand with a virtual instrument, which will create the instrument sound from the MIDI notes and play it back through your iPad's speakers.