Bring syrup ingredients to a boil, stirring constantly, reduce to simmer for 5 min. Remove from heat then remove the cinnamon and star anise. Let cool. Set aside.
Bring yuca and malanga covered with water to a boil then reduce to simmer for 20-30 min until the vegetables are tender. Drain. Transfer to bowl. Remove the core from yuca.
Mash the yuca and malanga using a potato masher until no lumps remain. Mix in the beaten egg, anise extract, and salt until combined. Add the flour and knead until a soft, smooth dough forms.
Cut dough into equal pieces. Roll each into a thick rope. Shape each into an 8 shape, press the ends together to seal them. Transfer them to a baking sheet or large plate.
Heat 3-4 inches of oil at medium-high heat until 375ºF. In batches, fry about 2-3 min on each side until golden. Don't overcrowd pan. Transfer to towel-lined plates to drain excess oil. Repeat.