Assuming the two columns are containing continuous cell ranges.
A
(1.) Collect some meta information first in a few available cells: Numbers of used cells for each column.
(2.) Dedicate two extra columns to calculate (MATCH or COUNTIF or …) for each source column independently which elements occur there the first time (top down) inside the column .
(3.) Modify the formulae for the second source column to also return FALSE if the element already occurred in the first column.
(4.) Collect new meta info: How many distinct elements from each column.
(5.) Use one of my many examples demonstrating how to “compact” a selection based on such helper columns twice.
(6.) Make one column from the two results using OFFSET again in a final column.
B Use the obvious interactive means: Copy/Paste and Filtering.
For your convenience (and as a final demo concerning questions of the kind) I made this new example doing as described under A.
(Appended:) Please be sure to note that the data for this demo are generated randomly and will thus change on full recalculation.
(Editing with respect to the discussion redarding the answer by @rautamiekka)
For requests of the present kind it mostly essential to know whether the “data” to be processed are actually data (direct content of the cells; types 1 or 2) or probaly formula results. In the second case the suggestion to register a sheet as (a table of) a database may not apply, IMO. In addition a database will only accept sheets of a restricted structure as tables. If thie condition of only containing constants is met I would suggest to use interactive means as demonstrated in this second attachment.