How do I flash to a newer Android version when TWRP has trashed recovery image and boot?
First off, make sure you have the proper ADB drivers. Use the PDANet ADB Installer. It should install the right version of ADB.

Next, you're going to want to enable Developer Mode. To do this, open up your settings app. At the bottom of the screen (you may need to scroll), there should be a Developer Options button. Open that up.


  If you do not see Developer Options, go into your About Tablet and follow these steps:
  
  
  Find the "Build Number" value.
  Tap the "Build Number" five to ten times. You should eventually see a toast saying "You are now a Developer!" or something similar.
  Exit out and go to the Developer Options menu.
  


In Developer Options, find the toggle for "Android  Debugging." You want this to be on. It will ask you for confirmation. Go ahead and give it.

Now, go back to your computer and run adb devices. You should see the device there. Download whatever ROM you want to flash, and place it on your device's SD card. If you need Gapps, place it there as well.


  If you still don't see your device, make sure your USB storage mode is set to PTP. Go to Storage in your Settings app and tap the menu button. Select USB Computer Connection and set to PTP.


After this, you're going to want to run adb reboot bootloader. This will place you into Fastboot mode, so that you can flash a clean TWRP.

Once you have downloaded a clean TWRP and gotten into fastboot mode, run this command from the folder that the TWRP image is in (it may be helpful to move TWRP to the folder fastboot.exe is in):

fastboot flash recovery your_recovery_image_name.img


Give it a couple minutes, and your recovery should be installed. Reboot into TWRP using the Bootloader.


  If the bootloader has no such option, let the system boot into full Android and run adb reboot recovery.


When you're in TWRP, you're going to want to install your custom ROM. Consult the ROM creator for instuctions on how to do this.