This is due to what is called 'Floating Integral Conversion'. In the case of 'i' the number 3 is a prvalue that can be represented as an integer, so it is treated as one in that operation. But the number 3.0 cannot be stored as an int, so in the second case 'i' is converted to a floating point for the purpose of the operation.
In the case of 'j', both 6 and 6.0 are values that can be stored in a float. So both prvalues are promoted to doubles and the operations are treated the same.