Hello and welcome to the Revit API.
First of all, an overview over all the basic information you might need to get started is provided by The Building Coder:
To address your question: first of all, it is normally best to determine how to solve the task manually in the user interface. Then, you can use RevitLookup and other tools to explore the database, the affected elements, their properties and relationships to determine what was modified, and finally, research how to achieve the same programmatically through the API:
- https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-ontology.html#3
- https://thebuildingcoder.typepad.com/blog/2013/11/intimate-revit-database-exploration-with-the-python-shell.html
In your specific case, it may to super simple. Maybe, all you need to do is move the element in querstion, e.g., by modifying its LocationPoint value in its Location variable, or by calling MoveElement on it:
I hope this helps.
Best regards,
Jeremy