please note that there is no Broker 9.8, only the latest Broker 9.6, which is valid for wM Suite 9.8 though.
Please check the Upgrade Guide for wM 9.6 or wM 9.8 for considerations when migrating the Broker configuration.
Additionally check in which direction the Gateways for connecting 8.2-Territories to 9.6-Territories should be created.
For compatibility reasons make sure you have applied latest ServicePacks/Fixes to 8.2- and 9.6-Brokers and there APIs (esp. Java-API). Make sure that the MWSes involved have the latest Fix for Broker Portal applied.
Updating the Java-APIs should be done on each installation directory regardless which compononent is hosting.
You should consider the following approach:
Migrate all instances (Brokers, ISes, MWSes) which are operating against one Broker Territory together in one phase and then connect this Territory via Gateways to the other Territories it needs to interoperate with until these are migrated too. Then reconfigure the Gateways phase by phase according the progress.