The brightness of a star decreases with distance from Earth, following an inverse square law. Therefore, if star A is twice as far away as star B, the apparent brightness of star A will be 1/4th (2^(-2)) of the apparent brightness of star B.
However, the intrinsic brightness of both stars is the same. Therefore, the ratio of their intrinsic brightness will be the same as the ratio of their apparent brightness. So, the apparent brightness ratio of 1/4 translates to an intrinsic brightness ratio of 1/1. Therefore, star A and star B have the same intrinsic brightness, even though star B appears 4 times brighter than star A to our eyes due to its closer distance.