1. Extract or “unzip” the downloaded firmware. Use winzip, 7zip or any decompressing tool in your computer.
2. Reboot the Galaxy Tab2 into Download Mode
Turn it off, then press and hold down the “Power and Volume DOWN ” buttons at the same time. You will get a warning screen. Press the “Volume UP” to get into download mode. Don’t connect the tablet into the computer yet.
3. Extract and Run Odin flasher tool. Run this as administrator (Right click the Odin.exe and select Run as Administrator).
4. In Odin’s checkboxes options, DO NOT Check the “Re-Partition”, just leave “Auto-Reboot and F-Reset Time” marks.
5. In Odin, click the PDA and choose the downloaded file you extracted. It should end in a .tar.md5 format.
6. Plug the tablet to PC USB connection. In Odin, under ID:COM will highlight and shows the current com port of your Galaxy Tab 2connected to. If you don’t see this and Odin doesn’t responds, it means the device is not connected yet, just try another USB port or USB cable. Give it a few seconds. Sometimes plugging a Download Mode device into the PC initiates another round of driver installs.
7. Click the START button.
8. Wait until it’s finishes flashing. Once it’s done, the tablet will just reboot.
Source:
Install P5100XXDNA1 Galaxy Tab 2 10.1 P5100 Android 4.2.2 Update - Android Firmware Update
Edited: for clarity