Hi @Emmanuel Guido,
A small attempt from my side for this problem,
=IF(A2<A3,SUMIF(OFFSET(A3,,,IFERROR(MATCH(A2,A3:A$11,0),COUNT(A3:A$11))),A2+1,C3:C$11),B2)
Assuming your data is in range A2:B11, you can use below formula.
We take the value in column B if row below has same or higher level...