Place the yuca in a pot and cover with salted water. Bring to a boil, reduce the heat to medium and cook until the yuca is tender 15 to 20 minutes. Drain well and let cool until it is easy to handle. Remove and discard the string-like fibrous core. Cut the yuca into 1-inch cubes.
While the yuca is cooking heat the vegetable oil in a frying pan over medium heat. Add the onion and garlic and cook, stirring until soft. Add the tomato paste and stock and cook until the liquid is reduced by almost half.
Add the cooked yuca, black-eyed peas and parsley and season with 2 teaspoons salt and 1 teaspoon pepper. Combine well and continue cooking stirring from time to time until it forms a chunky mass. Adjust the seasoning and let cool until it is easy to handle.
Shape by hand into 6 thick cakes about 3 inches wide or use ring molds. Place the cakes on a plate, cover loosely with plastic wrap and chill in the refrigerator for about 1 hour until they firm up.
Preheat oven to 350°F.
In a nonstick frying pan heat the palm oil over medium heat. Working in batches if necessary fry the cakes until golden brown and crisp for a few minutes on each side. Place the cakes on a baking sheet and finish cooking in the oven until the center is hot, about 10 minutes.
Serve hot