No you can't take same integer
Now let us take set under consideration {1,2,3,4,5,6,7,8}
Possible pairs {{1,8},{2,7}{3,6},{4,5}} (since (1,2)=(2,1) we have not taken it)
Now let us to make an set of 5 integers that won't have any of above pair
so A={1,2,3,4,X} and B={8,7,6,5,Y}
now for X and Y you have to take an element from another set which will ultimately give sum 9