What devices do you have?
Are they both tied to the same Google account?
What is the purpose of temporary time outs?
As AshS23 eluded to some devices have stuff like this built in but it is impossible for us to tell you what it would be called on your device without knowing what your device is. Samsung has Bixby for instance and the one that AshS23 mentioned. These are usually called assistants but you probably won't find it on the device under that name.
I asked about the shared Google account because I have a recommendation but it is an inexpensive paid app if your device doesn't have an assistant. Tasker is an automated app that you can find at the Play Store that automates actions on Android devices using logic statements. For instance if this temporary timeout is a daily event or a Wednesday event that happens at the same time a profile might look like, Wednesday at 19:00 change screen timeout to 10 minutes. Wednesday at 20:00 change screen timeout to 3 minutes. It can also do things by location, opening an app, date, incoming call, SMS and probably a few that I've forgotten. It's very versatile and can do so many things. Which brings me to my next thing. There are other free automation apps at the Play Store, I don't know those apps so I can't recommend one but many have the same capabilities. Tasker has a forum at Android Central and a Tasker wiki page online where you can turn to for help, I don't think the others do.
Perhaps if we knew more about why you wanted to change your screen timeout we could recommend other things. Why and perhaps the circumstances around the change. For instance if you are just trying to keep it awake longer for a class there might be a better way, easier way, so on and so on.