Joanie is organizing her closet. she has 3 times as many black shirts as gray shirts, plus 3 new black shirts she just bought. she has 5 times as many white shirts as gray shirts, minus the 1 white shirt she donated. joanie has 2 times more gray shirts than brown shirts. If she has the same number of black and white shirts, how many gray shirts does she have?

Let x be the number of gray shirts.

Joanie has 3x + 3 black shirts.
She has 5x - 1 white shirts.
She has 2x brown shirts.
3x + 3 = 5x - 1.
4 = 2x.
x = <<2=2>>2 gray shirts. Answer: \boxed{2}.