Does source transformation in circuit analysis work the other way around?
But is it ok for source transformation in second picture


No, the left-most source is indistinguishable from a 1A current source and the right-most source is indistinguishable from a 1V voltage source.

Placing a resistor in series with a current source does not change the overall source impedance since a current source has 'infinite' source impedance.

To see this, note that the open-circuit voltage for the left most source is 'infinite' while the short-circuit current is 1A.  But this is identical to a 1A current source without a series resistor.

Placing a resistor in parallel with a voltage source does not change the overall source impedance since a voltage source has zero source impedance.

To see this, note that the open-circuit voltage for the right most source is 1V  while the short-circuit current is 'infinite'.  But this is identical to a 1V voltage source without a parallel resistor.

Thus, the left-most source is not equivalent to the right-most source.