There are a number of ways to relate 2 (or more) data sets, but probably the most common in PowerShell is to find a common & unique property and use hash tables to relate one to the other.
Assuming you have the ImportExcel module; Here's a simple example based on the somewhat limited information you gave:
I created:
FileA:
ID Text1 Tex2
1 something1.1 something2.1
2 something2.1 something2.2
FileB:
ID Text3
1 SoemthingElse
2 SomethingElse2
$FileA = 'c:\temp\fileA.csv'
$FileB = 'c:\temp\fileB.csv'
$MergeFile = 'c:\temp\FileA_BMerged.xlsx'
$FileB_Hash = @{}
# Create a hash table from the data in FileB indexed on the ID column.
Import-Csv -Path $FileB |
ForEach-Object{ $FileB_Hash.Add( $_.ID, $_) }
# Now Import FileA via Import-Csv and correlate the data using the ID to tie the
# 2 sets together.
#
# Notice the use of Select-Object with a calculated property.
Import-Csv -Path C:\temp\FileA.csv |
Select-Object *,@{Name = 'Text3'; Expression = { $FileB_Hash.($_.ID).Text3 } } |
Export-Excel -Path $MergeFile
Export-Excel is the last and least obscure part it's simply taking the objects created earlier in the pipeline steps and outputting them into an Excel sheet.
You do have to be sensitive to the field names. Make sure your keys are unique otherwise you'll have to handle differently. The basic principal is when you encounter the ID in the first collection you can use it to easily reference the object in the second set then use that data to extend the data in the first.
We can mix this in different ways including not use either set as a basis and simply creating a collection of PSCustomObjects. However the main principal should be the similar.