For your example case, it's simply the matter of seeing multiplication as repeated addition. So, 2x is x+x, and from this follows:
2(x+y) = (x+y)+(x+y) = x+y+x+y = x+x+y+y = 2x+2y
However, for the other case, when we convert the multiplication by 2 to an addition and back:
2(xy) = (xy)+(xy) = xy+xy = 2xy
Now we can show that this works for n instead of two:
n(x+y) = (x+y)+..[n times]..+(x+y) = x+..[n times]..+x + y+..[n times]..+y = nx+ny
And for multiplication:
n(xy) = xy+..[n times]..+xy = nxy