xRed and yRed position for the RED ball . Remember this should be set to x anywhere and y will be a random between 200 and 400. The ball will be width and height of 30
xBlue and yBlue position for the blue ball. Set this to 0, 0 and width and height of 30.
int xRed=int (random());
int yRed=int (random(200, 400));
int xBlue=0;
int yBlue=0;
xRed is the x component of the red ball, and as per your brief is allowed any value, while yRed is the y component of the red ball and can only take values between 200 and 400.