Let's think about this for a moment.
Revelation 11:7 And when they shall have finished their testimony, the beast that ascendeth out of the bottomless pit shall make war against them, and shall overcome them, and kill them.
We know from this verse that they are not made war against, nor overcome, nor killed, during the 3.5 years they are giving their testimony. This obviously requires another period of time after the 3.5 years they give their testimony in order to fulfill verse 7. Thus another 3.5 year period follows, this period referring to the 42 month reign of the beast in Revelation 13, obviously.
Verse 7 does not say when they are killed, it only says they are killed. When they are killed then come to life again, the 7th trumpet soon follows.
Revelation 11:15 And the seventh angel sounded; and there were great voices in heaven, saying, the kingdoms of this world are become the kingdoms of our Lord, and of his Christ; and he shall reign for ever and ever.
I wouldn't think this is fulfilled during the 42 months the beast is reigning, at least not at the beginning of that reign for sure.
Compare the following----the kingdoms of this world are become the kingdoms of our Lord, and of his Christ; and he shall reign for ever and ever---with this in Revelation 13:8 And all that dwell upon the earth shall worship him, whose names are not written in the book of life of the Lamb slain from the foundation of the world.
Obviously the beast has made himself out to be the most high god. This is also referring to 2 Thessalonians 2:4. So how can the kingdoms of this world are become the kingdoms of our Lord, and of his Christ, any time during the 42 month reign of the beast, where during that time the beast has control of the kingdoms of the world meant here? Doesn't it then seem logical that the two witnesses are killed at the end of the beast's reign, rather than at the beginning of it? Because if they are not, we then have to place the 7th trumpet during the 42 month reign of the beast, where during that reign the beast has control over the kingdoms of the world at the time, for the entire 42 months given to him to fulfill.
Revelation 11:18 And the nations were angry, and thy wrath is come, and the time of the dead, that they should be judged, and that thou shouldest give reward unto thy servants the prophets, and to the saints, and them that fear thy name, small and great; and shouldest destroy them which destroy the earth.
The wrath against the beast and it's followers would be after the 42 month reign of the beast, not during it. The time of the dead, that they should be judged, would be after the 42 month reign of the beast, not during it.
We also have the following once the 7th trumpet has sounded.
and there were lightnings, and voices, and thunderings, and an earthquake, and great hail(Revelation 11:19).
This wouldn't be during the 42 month reign of the beast either, it would be after, and appears to be connected with the vials of wrath.
As to saying peace and safety. Not only might they be saying that once the 2W have been killed, they also might be saying it during the entire 42 month reign of the beast. From their perspective, since they are worshiping the beast, thus the beast is not making war against them, nor overcoming them, nor killing them, they might feel a sense of peace and safety compared to the ones the beast is making war against. Maybe that makes little to no sense to you, that they could be saying peace and safety during the reign of the beast, yet it makes good sense to me though.