You are not resetting transformation matrix.
Try this
glPushMatrix();
glTranslatef(-300 + x, 300 - y, 0);
glBegin(GL_POLYGON);
for (int i = 0; i < 6; ++i) {
glVertex2d(50 * sin(i / 6.0 * 2 * M_PI),
50 * cos(i / 6.0 * 2 * M_PI));
}
glEnd();
glPopMatrix();
glPushMatrix();
glTranslatef(-200 + x, 300 - y, 0);
glBegin(GL_POLYGON);
for (int i = 0; i < 6; ++i) {
glVertex2d(50 * sin(i / 6.0 * 2 * M_PI),
50 * cos(i / 6.0 * 2 * M_PI));
}
glEnd();
glPopMatrix();