Farid,
Note (b) under the figure (8a) refers you to sketch 8 for the welds sizing and to the previous page, to sketch (2) for flange geometry. The nozzle neck thickness is subject of other calculations, most likely you have that already completed. The nozzle thickness is not included in the geometryrefer sketch(2)), hence X1 and X4 are irrelevant dimensions.
X2 is g1 and X2 is g0; further, h2=h >= 1.5 x X3
h1= h2+c
You start the flange calculations with assuming X3 = c (refer to the definitions at the start of Appendix 2). Then increase a bit X3 and check the results; then incease h2 and check; then increase X2 to a max. h2/3 and check, until you arrive to an optimum thickness (remember to refer to TEMA for PCD, OD and bolt spacing).
Cheers,