Theory:

Proxima Centauri is found to be the nearest star to our solar system. However, it is at a distance of \(2,68,770\ AU\) in terms of astronomical units, which would be difficult to calculate. Also, for measuring the distance between any two galaxies, astronomical units are not sufficient.
 
So, astronomers use a specific measurement unit known as a 'light year' to measure distances in deep space.
 
download.jpg
 
The speed of light in the absence of air (vacuum) is about \(300,000\) \(km\ per\ second\). This means that the distance covered by the light is \(3 \times{10^8}\) \(m\) in one second.
 
Consider the non-leap year for calculation since it has \(365\ days\) with \(24\ hours\) in a day. Each hour has \(60\ minutes\) and \(60\ seconds\) in each minute. Thus, the total number of seconds in one year is calculated as,
 
Time=365×24×60×60=3.153×107second
 
The distance covered by the light travelling at a speed of \(3 \times{10^8}\) \(m\) in one second for a year gives one light year.
A light-year is defined as the total distance travelled by light in one year.
Calculation of light year
The value of one light-year can be calculated by multiplying the speed of light and the total time taken by the light in one year.
 
Onelightyear=Speedoflight×Time=3×108×3.153×107=9.46×1015m
 
Distance of stars
Proxima Centauri is the nearest star at a distance of \(40,000,000,000,000\) \(km\) from the Earth. To find the distance of Proxima Centauri in terms of light-years, divide the distance given in \(kilometres\) by the value of one light year.
 
Lightyear=40×10129.4607305×1012=4.228
 
In terms of light-years, the distance is approximately \(4.23\ light\ years\) from the Earth. Likewise, the distance of another star, Alpha Centauri, the second-closest star, is at \(4.3\ light\ years\).
Reference:
https://c.pxhere.com/photos/1f/69/planet_earth_globe_space_world_continents_blue_light-632989.jpg!d