Using your definitions,
x_0,y_0 = offset coordinates
x_off,y_off = offset distance
w = target width
h = target heigth
then
X1/Y1 = (x_0+x_off-.5*w),(y_0+y_off+.5*h)
X2/Y2 = (x_0+x_off+.5*w),(y_0+y_off+.5*h)
X3/Y3 = (x_0+x_off+.5*w),(y_0+y_off-.5*h)
X4/Y4 = (x_0+x_off-.5*w),(y_0+y_off-.5*h)
Filling in your example,
x_0,y_0 = 0,0
x_off,y_off = 38,0
w = 10
h = 25
then
X1/Y1 = (0+38-.5*10),(0+0+.5*25)=33,12.5
X2/Y2 = (0+38+.5*10),(0+0+.5*25)=43,12.5
X3/Y3 = (0+38+.5*10),(0+0-.5*25)=43,-12.5
X4/Y4 = (0+38-.5*10),(0+0-.5*25)=33,-12.5
Now including an y offset distance,
x_0,y_0 = 0,0
x_off,y_off = 38,45
w = 10
h = 25
then
X1/Y1 = (0+38-.5*10),(0+45+.5*25)=33,57.5
X2/Y2 = (0+38+.5*10),(0+45+.5*25)=43,57.5
X3/Y3 = (0+38+.5*10),(0+45-.5*25)=43,-32.5
X4/Y4 = (0+38-.5*10),(0+45-.5*25)=33,-32.5
Hope this helps.