Study of 2β-decay of 100Mo and 82Se using the NEMO3 detector