Stalin established both of these groups for the same reason. They were both meant to strengthen the communist bloc and to strengthen Soviet control of that bloc.
After World War II, the Soviet Union established a communist bloc made up of satellite countries in Eastern Europe. Stalin wanted to have more control over these countries. He wanted to control them so that the Soviet Union could direct the spread of communism and so they could serve as a reliable buffer against the West. In order to gain more power over these countries and to make them stronger as a bloc, he established Cominform to increase Soviet political control and Comecon to increase Soviet economic control.