Answer
$\sin∠D=\dfrac{\sqrt3}{3}$
$\cos∠D=\dfrac{\sqrt6}{3}$
Work Step by Step
It's obvious that the triangle $\triangle EGD$ is the right triangle, where $\angle G$ is the right angle. We have to find sine and cosine of $\angle D$.
By the definition sine is equal to the ratio of the side opposite a given angle (in a right-angled triangle) to the hypotenuse.
$\sin\angle D=\dfrac{opposite}{hypotenuse}$. In our case $\sin∠D=\dfrac{EG}{ED}.$
Similarly, cosine is equal to the ratio of the side adjacent to an acute angle (in a right-angled triangle) to the hypotenuse.
$\cos∠D=\dfrac{adjacent}{hypotenuse}=\dfrac{DG}{ED}.$
We just have to find $ED$, $DG$ because we know that $EG=y$ inches. For that we will use Pythagorean theorem.
The triangle $\triangle GCD$ is the right triangle, where $∠C$ is the right angle. So
$DG^2=GC^2+CD^2.$
For our cube $GC=CD=y$ inches. And DG is equal $DG=y\sqrt2$ inches.
The next right triangle is our well known $\triangle EGD$. Similarly,
$ED^2=DG^2+EG^2=(y\sqrt2)^2+y^2=3y^2$.
So $ED=y\sqrt3$ inches.
Now we have everything to find sine and cosine.
$\sin∠D=\dfrac{EG}{ED}=\dfrac{y}{y\sqrt3}=\dfrac{1}{\sqrt3}=\dfrac{\sqrt3}{3}$
$\cos∠D=\dfrac{DG}{ED}=\dfrac{y\sqrt2}{y\sqrt3}=\dfrac{\sqrt2}{\sqrt3}=\dfrac{\sqrt6}{3}$