Join two data tables in one. One of the two is dynamic on it's length

Hi there.

i’m struggling with some doughts about what path should I follow.

I’m trying to join two data tables(2 columns wich one) and one data table organized in such way that last value must always be on specific Cell.

Don’t really know where to start LookUp Range, Join data tables, Filter…

Example:

imagem

Thanx in advance

you can use this flow
image