Both the bikes you have mentioned will fit the bill for your use case. However, both the Triumph Scrambler 400 X and the TVS Apache RTX 300 have tall seat heights (830mm or more), and for a new rider of your stature, they could feel like a little too much, especially at slow speeds and during off-roading. We would strongly recommend a test ride of both before you decide to go ahead with your purchase.
If these two prove to be too tall for you, something more street-biased (and crucially, lower) like the Triumph Speed 400 or Apache RTR 310 from these respective brands would be a good fit.

