Assuming you know the quadratic formula:

You can fill in a, b and c in this and get:

Now, let's create a shorthand
to make the writing easier:

But since one root is three times the other root (but we don't know which one), we also know that:
or

If you solve this, you get:
or

However, since q is a square root, it must be postive.
So we know that:

From this you find that

So p = 3/2
The roots are x=1/2 and x=3/2.