The first picture is a voltage follower, or a non-inverting amplifier of gain=1.
Problem with the second picture is that the output is connected to input and to inverting input of the opamp. As it is, it in totally wrong configuration.
If you would like to have inverting buffer/amplifier of gain=-1 you have to place two identical resistors, first between outpit of the opamp and its inverting (-) input, second betwenn Vin and the (-) input of the opamp ..
And on top of that +V=-15V ---->big problem