How to provide separate voltages from a common power source
As your question is not very precise, and according to the few pieces of information you gave in the comments, I will assume:


You need to lower the voltage to 4V and 3V to supply the main POWER of 2 devices
The left device is a sensor, which requires a power supply of 4V
The right device is a microcontroller, which requires a power supply of 3.3V (common voltage for a microcontroller, but if you really want 3V, you can adapt my answer with 3V)


As we only talk about powering devices, any voltage divider won't work properly, whatever the values used for the input voltage or the resistor. This is because one of the main assumption of a voltage divider is to have no current at the output. This is not the case here, as both the microcontroller and the sensor are consuming current: they are considered as "loads" for the circuit.

As explained in the comments, the solution is to use voltage regulators. But, because you need 2 different voltages, you will need 2 different regulators: one with an output of 4V, to power your sensor, and a second one with an output of 3.3V (or 3V), to power the microcontroller. The 2 regulators input can be connected to the same main power source, which could be a battery, for example.

This brings us to the second advantage of a power regulator: they can accept a large range of input voltage (with limits given in the Datasheet), and the output voltage will always be regulated at the same value. When using a battery, let say a 2 cells lithium ion, the output voltage is not constant. It will vary between about 6V, when discharged, to around 8.4V when fully charged. Using a regulator will allow you to run your devices whatever the battery charge.

Note: there are few cases where you could use resistors to lower the voltage for a power supply. However, I would not recommend to do so in your case, as it requires a good understanding of the behaviour of your loads to ensure the power supply voltage will always be within the limits they can tolerate whatever the situation.