constructed sum

a = 4 (slider from 0 to 5, step 0.2)
b = 3 (slider from 0 to 5, step 0.2)
f_1(x) = a * sin(x)
g(x) = b * cos(x)
h(x) = f_1(x) + g(x)
A = (14.7, 5.08)
B = Point(Circle[A, a])
c = Segment(A, B)
d = OrthogonalLine(B, c)
C = Point(Circle[B, b])
e = Segment(B, C)
k = Circle(B, C)
D = Intersect(k, d, 2)
poly1, a_1, b_1, m = Polygon(A, B, D)
α = Angle(B, A, D)
i = false
p(x) = Length[m] * sin(x + α)