Solve the ideal diode circuit
It would probably be better to start by assuming the diode is open. This isolates the current source and the two series resistors, making it easy to check whether the anode of the diode is positive or negative with respect to the cathode.

Note that the 30&Omega; resistor is completely irrelevant to the rest of the circuit, since it is connected directly across a voltage source. You can ignore it altogether.

Note also that the power in the 40&Omega; resistor is determined entirely by the current source; nothing else in the circuit matters.