Construct a musical composition following the designated musical form and incorporating the given motif.
X:1
L:1/8
M:6/8
K:G
['g2 d', 'ABA FAd f2 f'  
X:1
L:1/8
M:6/8
K:G
 e/f/ | g2 d e2 B | dcB G2 F/E/ | DFA cBA | GAB def | g2 d edB |{d} cBA GFE | DFA cBA | G3 G2 :: 
[K:D] F/G/ | A>AA ABA | FAd f2 f | gfg ege | faf dcB | A2 A ABA | FAd f2 f | gfe ABc d3 d2 :|  