The key to these types of problems is to rewrite the question in mathematical formulas. It takes some practice, but it's way easier than it looks.
K is short for Kaleigh.
J is short for Juan.
K = 3 * J
(K - 7) = 4 * (J - 7)
English grammar is fun because you can literally substitute key words with the math.
Kaleigh (K) is (=) three times (3 *) as old as Juan (J).
Substitute forms of the verb "to be" (such as 'is' or 'was') with an equal sign, and you're done!
Seven years ago (this one is a bit trickier) she (Kaleigh) (K) was (=) four times (4 *) his age (Juan) (J).
The trick here is that in order for this to work, both of their ages must be subtracted by seven. Be careful of the order of operations, and make sure that Juan's age at that time (J - 7) is being multiplied by four, instead of subtracting 7 from 4 times his current age. Again, it just takes a little practice with the logic.