So, you have the following differential equations
\dfrac{d^2x}{dt^2}=-4x \\<br />
\dfrac{d^2y}{dt^2}=-4y<br />
Notice that they are very similar, so I will describe my solution to x(t), but that can be extended to y(t). The formal solution requires a little background on differential equations. If you want to, you could look up "2nd order homogeneous differential equation with constant coefficients" on Google - that's the kind of equation you have for x(t) and y(t). I will try to explain how I ended up "guessing" the function. Look at
\dfrac{d^2x}{dt^2}=-4x
that means that the second derivative of x(t) is -4 times x(t). Ignore the 4 for a while and think about that: you want for x(t) a function that, when you derive twice, you get the function again, but with a minus sign in front of it. If you take a sine function, you have
\sin'{t} = \cos{t}
if you derive again
\sin''{t} = \cos'{t} = -\sin{t}
So sin(t) is a suitable function for x(t). However, I want to also produce a 4 when I differentiate twice, you can check that it works for sin(2t). This will actually also work if you have a number in front of the sine, so x(t) = Asin(2t) is actually a more general solution.
And how am I supposed to find out how much is A worth? Well, you know that the initial velocity in the x direction, that is, dx/dt at t=0, is 3.
x'(t) = 2*A*cos(2t), at t=0 you get
x'(t) = 2*A*cos(0) = 3
therefore A = 3/2.
So, x(t) = (3/2)sin(2t).You may wonder how the hell did I know that a sine would fit. Well, that comes from experience. If you do not remember that a sine and a cosine have that property that, if you differentiate them twice, you get them back with a minus sign in front of it, all you can do is solve the differential equation by a formal methor - which is somewhat like following a cake recipe you have to memorize.
As a tip, anytime you have x''(t) + k²x(t) = 0 as an equation, the general solution is x(t) = Acos(kt) + Bsin(kt).
It is somewhat hard to explain the guessing process, is that a little more clear now? :/