@varkas
If i were to use one of them, since p is the position would I set p to an x or y value? or something different?
I think the cos and sin are backwards. I thought x always went with cos, and y with sin
The fact that compilers are able to optimize mutability better is still very orthogonal to the fact that referential transparency is simply easier to reason about, both for the computer and the user. Application is just textual substitution anywhere you want it to be.
But on the other side of the coin, the other unfortunate fact is that for a lot of games, we’re still up against the limits of how well the machine can perform with immutable data. Since java has no concept of immutable values beyond primitives and some really basic optimizations on String, and therefore isn’t going to bypass garbage generation very often, we’re stuck with a lot of in-place modifications for matrix and vector ops done in bulk.
If 0 degrees is pointing along the y-axis, then x is sin and y is cos. If 0 degrees is pointing along the x-axis, you are right. It all depends on what system you use.

@varkas
If i were to use one of them, since p is the position would I set p to an x or y value? or something different?
The variables are vector types, in 2D space, they will be (x,y) pairs.
Untested code, using java.awt.Point:
Point p = new Point(startx, starty);
Point v = new Point(speedx, speedy);
double time = (currentTime - timeWhenFired) * timeLapseFactor;
// no gravity
double actualx = p.x + v.x * time;
double actualy = p.y + v.y * time;