First, on this forum it is a good idea to provide your data set(s) as data step code that will create a set similar to the one you want to use. Paste the code into a text box opened on the forum with the </> icon as the main message windows here will reformat pasted text which may make code fail.
Here is one way. Note the two example data sets as code:
data one;
  input patentes;
datalines;
1
2
3
;
data two;
  input class $;
datalines;
A1
A2
B1
;
proc sql;
   create table want as
   select one.patentes,two.class
   from one,two
   ;
quit;