Let's start by defining some variables:
Let's call Jamal's age "J".
Let's call Alex's age "A".
From the problem statement, we know that:
J = A - 5 (Jamal is 5 years younger than Alex)
J * A = 300 (the product of their ages is 300)
We can use the first equation to substitute J in the second equation:
(A - 5) * A = 300
Expanding the left-hand side:
A^2 - 5A = 300
Moving all terms to the left-hand side:
A^2 - 5A - 300 = 0
We can solve for A using the quadratic formula:
A = (-(-5) ± sqrt((-5)^2 - 41(-300))) / (2*1)
A = (5 ± sqrt(25 + 1200)) / 2
A = (5 ± sqrt(1225)) / 2
Since A is a positive integer, we take the positive solution:
A = (5 + 35) / 2 = 20
Now we can use the first equation to find J:
J = A - 5 = 20 - 5 = 15
Therefore, Jamal is 15 years old.