I have this table with data below and need help because I don't know which formula can I use to convert the table into the desired one.

I have this table with data below and need help because I don't know which formula can I use to convert the table into the desired one.