They are definitely GWR, and I'm going to stick my neck out and say that the photo is between 1899 and 1914. Designs are probably brake 3rd, S18, S16, R4, S16, S18, brake 3rd. Unfortunately I don't think there is a diagram for these brake thirds as built. The brake 3rds only had 3 compartments when built, not 4 compartments as T17 was built. They are very similar to T9, but T9 were built as 2nd class with a wider compartment spacing. The brake 3rds have been reduced to 2 compartments, evidenced by the lower foot board below the 'middle' door and the additional handle on the lower panel.
Whilst removal of the lower foot board is unusual there were other rakes of Birmingham 4 wheelers that were treat the same: http://penrhos.me.uk/CoachesIntro.shtml.
This is a unique rake of electrically lit 4 wheel coaches. As K14 has mentioned there is a battery box and dynamo under the first coach. I can also see battery boxes under coaches 2 & 3 and possibly dynamos under coaches 5 & 7. There are no lamp tops on any of the roofs, but instead shell ventilators. Generally one ventilator per compartment, but 2 on the R4 and brake 3rds. So far in all of my research I've only found 9 off 4 wheelers that had electric lighting! And 2 of these were recorded as being formed into the Birmingham Local No.1, either in 1899 or 1904.
Now to the loco. 517s were not the normal Birmingham area local train locos post war. By then the 36xx and larger tanks were normal. So I think it is pre-war.