Concept:
In ratio problems involving ages, the given ratio represents the proportional relationship between the ages of two individuals. If the ratio of their ages is known, we can assume the ages to be multiples of the ratio values and then use the given sum to determine their actual ages.
If the ratio of two quantities is:
\[
a:b
\]
then their actual values can be represented as:
\[
ax \text{ and } bx
\]
where \(x\) is a common multiplier.
Step 1: Represent the ages using the ratio.
The ratio of the ages of A and B is:
\[
4:5
\]
Let their ages be:
\[
4x \text{ and } 5x
\]
Step 2: Use the given sum of ages.
\[
4x + 5x = 36
\]
\[
9x = 36
\]
\[
x = 4
\]
Step 3: Find their present ages.
\[
A = 4x = 4 \times 4 = 16
\]
\[
B = 5x = 5 \times 4 = 20
\]
Step 4: Find their ages after 4 years.
\[
A = 16 + 4 = 20
\]
\[
B = 20 + 4 = 24
\]
Step 5: Find the new ratio.
\[
20:24
\]
Divide both numbers by 4:
\[
5:6
\]
Step 6: Final answer.
\[
\boxed{5:6}
\]