This question already has an answer here:
After windows failed to install, I was left with my partition, which bootcamp was supposed to remove but it froze and I exited it (probably not the brightest idea ever). So now I have these extra partitions and I'm trying to merge them back into my main disk, like how it was before the windows installation.
I've tried looking online at what to do but the (-) option that most sites seem to suggest using is greyed out, and would highly appreciate anyone who could help me.
I've attached screenshots of my disk information. I have the 2017 iMac, with Mojave installed.