MacOS wont boot after partitioning my SSD
The answer below was developed based on your question and the image you posted. A cropped version of this image is posted below.



Enter the following from linux.


  Note: I can tell you have taken steps that have not been posted to your question. Therefore, even if the procedure below repairs the partition tables, there may be damage to the APFS container from these steps that are unknown to me.


sudo gdisk /dev/sda
p
x
o
n
m
t
3
8300
n
5
409640
1561962535
AF0A
s
p
w
y


Explanation

Execute gdisk on the internal drive as root user.

sudo gdisk /dev/sda


Print out the GUID Partition Table (GPT) and the Master Boot Record (MBR) partition table.

p
x
o


Change the MBR partition table from hybrid to protective

n


Change the kali volume partition type from Microsoft to linux.

m
t
3
8300


Add back in the APFS partition.

n
5
409640
1561962535
AF0A


Sort the partitions in ascending order.

s


Print the resulting GPT.

p


Write the result back to the internal drive and exit gdisk.

w
y