The voltages are the same, but the power need may be higher for the Pi3 so the supply for the Pi3 could, if required, provide more power than a Pi2 supply. The additional power availability will not cause the Pi2 any problem. It just means that you could use more "power hungry" USB things on your pi2 without needing to get a better supply.