Stellar population in two star-forming regions