The Amiga's operating always consisted of two parts: the Kicktart ROM and several files on disk, one of them being the command to load Workbench. At some time people started to call the entire disk part of the operating system Workbench. So, if you bought an early A1200 with Kickstart 3.0 and Workbench 3.0, in order to fully upgrade to 3.1, you had to buy Kickstart 3.1 and Workbench 3.1.
The term AmigaOS for the Amiga's operating system was introduced with AmigaOS 3.5. Probably because there will not be another version of the Kickstart in the future than 3.1. But objectively AmigaOS 3.5 is nothing more than Workbench 3.5, or, even more precisely, version 3.5 of the disk-based part of the Amiga's operating system.
And yes, you need Kickstart 3.1 for both OS 3.5 and OS 3.9.
Bye,
Thomas