How to convert 9v to 3.3v and 5v?
Resistors are the wrong way to do what you want.  Step back to your actual problem, leaving out how you think it should be solved.

There are basically two reasonable approaches to making 3.3 V and 5 V power from 9 V.  These are a linear regulator and a buck converter.

A linear regulator is like a self-adjusting series resistor.  It keeps the output voltage constant despite varying input voltage.  These things are simple, cheap, robust, and widely available.  The drawback is that their input current is the same as their output current, so this current times the voltage drop from input to output is burned up as heat.  For small currents, this inefficiency is often worth the simplicity.  For example, your 5 V moisture sensor probably takes very little current.  A industry standard 7805 5 V linear regulator may be appropriate for it.

A buck converter is a more sophisticated circuit that is a type of switching power supply.  Instead of the input current being the output current, the input power is the output power (plus a little for inefficiency).

These become more attractive for higher powers and higher voltage drops for two reasons.  First, since they don't burn up the voltage drop times the current as heat, there is less heat to get rid of.  That is usually the driving reason since dealing with the heat is costly and takes physical space.  The second reason is to conserve power, like when a battery is used.

A buck converter is probably appropriate for making the 3.3 V from 9 V.  The voltage drop is larger and the current probably higher than the moisture meter.

For example, is you need 100 mA at 3.3 V, a linear regulator would draw the same 100 mA from the battery.  That's 900 mW coming from the battery.  Of that, (9V - 3.3V)*100mA = 570 mW will go to heating the regulator, and the remaining (3.3 V)(100 mA) = 330 mW will actually be delivered to the circuit.  The overall efficiency is only 37%.

In contrast, let's say a buck regulator is 85% efficient at dropping 9 V to 3.3 V.  The load requires 330 mW, so it will take (330 mW)/85% = 388 mW from the battery.  The current drain on the battery will only be (388 mW)/(9 V) = 43 mA.  Note that this is less than half of the battery drain resulting from using a linear regulator.