If the screenshot below is similar to the problem you faced, where two of the same items were separated.
If you want to GROUP these two items together,
Navigate to System Configuration.
Select Sales tab then select This Machine.
Search for Auto group same item which is under Miscellaneous and tick it then click on Save.
Hence, the two of the same items will be grouped together. Result as the screenshot below.