What is best way to do this using public transportation?
Use Deutsche Bahn website and check FlixBus connection.
And look for Magdeburg, not Magdeberg. A »burg« [boork] is a castle, a »berg« [bairk] is a mountain.
There is no rail service to Tegel airport - the best choice is to take the express bus to Berlin Hauptbahnhof and the train from there.