For the raft on water problem, one must consider the buoyancy force (Archimedes principle). The buoyancy force due to Archimedes principle is equal in magnitude to the weight of the fluid displaced, i.e., the weight of the fluid corresponding to the submerged volume of the object, and is opposite in direction to the gravitational force. This buoyancy force and the gravitational force explain why an object with density less than water floats in water, and why an object with density greater than water sinks. To an approximation, this buoyancy force is the only force by water to be considered for this problem. Then, there is the gravitational force on the raft and the person on the raft. You must show that the combination of these two kinds of forces results in a simple harmonic oscillation.
For the hole through the Earth problem, one must consider the so-called Newton's shell theorem. What it says is the following. Consider a thin spherical shell of mass with uniform mass density. Let us call the total mass of this shell, $M_s$. What Newton discovered with his calculus (and what you can readily prove with a little bit of multi-variable calculus and Newton's law of gravitation) is that the gravitational field inside the shell is zero, and the gravitational field outside the shell is the same field that would be generated by a point mass $M_s$ at the center of the sphere.
Now suppose that there is a solid spherical object, not a thin spherical shell, whose mass density does not depend on angles (think longitudes, latitudes). Consider the gravitational field generated by this object. Take the origin of the coordinate system to be the center of this sphere. Then, by Newton's shell theorem, the gravitational field outside this sphere is the same gravitational field by a point mass, whose mass is the same as the total mass of the spherical object, placed at the origin. This is because a spherical object can be divided into layers and layers of spherical shells (think of peeling an onion), for each of which Newton's shell theorem applies. Thinking like this, one realizes that it is just as easy to calculate the gravitational field inside the object (which is what we need in this problem). Let us say that the spherical object has radius $R$, and that we are interested in the gravitational field inside at distance $r < R$ from the origin. Then, by Newton's shell theorem, the field is equal to the point mass, whose mass is the total mass of the small sub-sphere whose radius is $r$, at the origin. Any part of the sphere at distance greater than $r$ from the origin does not contribute to the gravitational force at $r$!
In this homework problem, we assume, for simplicity, that the Earth's mass density is uniform. So, the density is not only angle-independent, but also radius-independent. The angle-independence is all we need in order to apply Newton's shell theorem, but the radius-independence is a very nice feature that makes it possible to readily calculate the $r$ dependence of the gravitational force.
The above are hints that may be able to get you started on these problems. I encourage students to look up the relevant principal concepts (Archimedes principle, Newton's shell theorem) and get really acquainted with them. I also encourage very much discussions between students in real space or in cyber space (i.e., on the forum).