use the apparent/absolute magnitude formula:
m-M = 5log(d) - 5
m = apparent, M= absolute, d = distance in parsecs.
To use this, though, you need to estimate the absolute magnitude. One way to do this is:
1. Look at the star, get a spectrum of the energy/light emitted from the star (using equipment like a spectrograph...). get information like colour, surface temperature etc.
2. Place the star in one of the spectral classes (OBAFGKMN) according to the data collected in 1.
3. Go to the HR diagram and go to the spectral class (normally x-axis). See what the range of absolute magnitude this section of the main-sequence corresponds to.
4. Plug in formula and you have estimated the distance from the Earth to the star.
I suppose one assumption is that the star in question is a stable star. i.e. it is currently in the 'main-sequence' stage of its life.
As for getting the mass of a planet, I can think of one way right now:
place a satellite in orbit at a specific altitude and measure its period. Use kepler's third law to find the mass of the planet. one problem which may arise is how to work out the radius of the planet.