Quite a range between a 7200 and a K5.
I would be wary of Pentax (check for common faults on the internet)
In the price range of the K5 and 7100, I would rather look at a Canon 650D (I moved from Canon just under a year ago, but kept a 650D for various reasons)
The Canon kit lenses are better (by far) than Pentax, and their in-lens stabilisation seems to work better than the Pentax in-body stabilisation (I used Pentax from 1973 to 2017/8)
The standard Canon 18-55 is good, and a very nice wide range lens is the 18-135 or a bit heavier the 18-200.
A low count 650D would be around £200 or less, possibly with a 18-55 lens, and less than £300 with a lens if you were in a hurry, there's a goad chance you could get one + and 18-55 + an 18-135 for your £400.
It would give you a feel for things so that you could decide what direction your interest was going to take, and give good performance and features for the money.
I don't know Nikon well enough to comment, I could never own one