I'm positive that the answer is trigonometry.
Refer to the following passage that I got from the Edg assignment.
"How then do astronomers measure the distance of stars? The parallax, considered very accurate, is one method used by astronomers to measure the distances to nearby stars. The diameter of the earth’s orbit around the sun is about 300 million km. By observing a star one day and then again six months later, these scientists will be able to observe differences in the star the two times it was observed. Using trigonometry, these different angles yield the distance of how far away a star is."