pretty hard to explain this one without a diagram to point at

Is taken from a right angled triangle where the long side (3 units) is from the middle to the point where the top of the cylinder meets the sphere. The 2 shorter sides are half of the height of the cylinder (h) and the remaining small side is the radius of the sphere.