Let us assume a value, a for the other part of the base. thus, the length of the base of the triangle is d + a
Considering the right angle traingle containing y degrees,
opposite side = h
adjacent side = a
Tan# = opposite side/adjacent side
tan y = h/a
a = h/tany
Considering the right angle traingle containing x degrees,
opposite side = h
adjacent side = a + d
Tan# = opposite side/adjacent side
tan x = h/(a + d)
a + d = h/tanx
a = h/tanx - d
If we equate both a's, it becomes
h/tany = h/tanx - d
d = h/tanx - h/tany