设集合A={|a+1|,3,5},B={2a+1,a2+2a,a2+2a-1},当A∩B={2,3}时,求实数a的值