Note that the distance that David and Ana travel are equal, since the problem doesn't specify otherwise. This means that one variable can be used for the distance, which we'll call d.
Now, let's try to write the formula for David. You seem to know the formula time = distance/velocity, which is good. Just plug in the values you know. We don't know the time, so we'll keep that as a variable, which we'll call t. We do know his velocity, and that's 12 km/hr, and we don't know the distance, so that'll stay as d. Now, plug those into time = distance/velocity, and you get t = d/12.
Let's write the formula for Ana. Her speed is 4 km/hr and her distance is also d. As for her time, we know it's 30 minutes longer than David's time. You might be tempted by this fact to write her time as t + 30, but notice that we keep the other values in terms of hours (e.g. 12 km/hr and 4 km/hr), so we have to keep this expression in hours, too. 30 minutes is half an hour so the expression is actually t + 1/2. We use the same variable t again because we're simply adding half an hour onto t, which is David's time. We have all of the values needed to write the formula for Ana now. Plug the numbers and variables in, and we get t + 1/2 = d/4.
This is important: we now have two equations and two variables, so we can solve the two equations t + 1/2 = d/4 and t = d/12.
Try to solve it yourself. I helped you through the hard part of word problems, which is turning words into numbers.