If I am correct in my understanding given (x,y) and w, h and rotation rot for the white rectangle then you can calculate the green rectangle.
The black rectangle has the same rotation rot as the white rectangle so presumably if you know (X,Y) and W and H for the black triangle you can use the same method to find the grey rectangle as you did to find the green from the white.
Consider the white and black rectangles before rotation, ie width is horizontal
The X=x-T, Y=y-T W=w+2T, H=h+2T, so now you have (X,Y) W, H and rot for black rectangle so can calculate the grey one.
EDIT
If (x,y) is after rotation, then start with the white rectangle with its width horizonal and the top left corner at (lx,ty) it follows that the top left corner of the black rectangle is at (lx-T, ty-T) and its width W and Height H is given by W=w+2T H=h+2T.
Now whenever you rotate the white rectangle rotate the black rectangle by the same amount using the same centre of rotation. This gives you (x,y) for new coordinates of the top left corner of the white rectangle and (X,Y) as the new coordinates of the top left corner of the black rectangle from which you can calculate the bounding rectangles.
EDIT rotating (x,y) about (0,0) by angle theta, with (x,y) rotating to (lx,ty)
lx=xcos(theta)-ysin(theta)
ty=xsin(theta)+ycos(theta)