Literals, like 15, 60, and 1000, are interpreted as ints, in the absence of any directive to the contrary. Nothing in the first calculation is larger than an int, so ints are used in the calculation. The result overflows an int. That the result is stored in a long is irrelevant.
In the second case, 15 * 60 is an int, stored in a long. Then the long is multiplied by an int, which is promoted to a long. The result is a long, which is stored in a long.
The third case is identical to the second. p = p * 1000 is identical to p *= 1000.