Hi Daniela8970c,
You can use AirPlay to screen mirror from an iPhone or an iPad to an Apple TV, AirPlay 2-compatible smart TV, or Mac. Currently, you cannot AirPlay from one iOS or iPadOS device to another. If you'd like to see an option for that in the future, you can let the appropriate teams at Apple hear your feedback by providing it here: Feedback - iPhone - Apple
In the meantime, if you're using an HBO app, or have linked your HBO account to your Apple TV app, you should be able to access those on the iPad directly, without having to AirPlay from another device. You can learn more about using third party streaming services with the Apple TV app here: Connect apps and add your TV provider to the Apple TV app on iPad - Apple Support.
Best!