I created an attribute (the same for two tracker programs) and ticked display in list without program checkbox so that it could be visible in the relationship widget, but the attribute does not show. I see only the relationship name.
The Tracked Entity Attributes appear in the user profile as you can see in the profile widget; however, the relationship widget is only for relationships and to create a relationship, you need to first create a relationship type from the Maintenance app → Program → Relationship type. In your case since you need to see the relationship in both profiles the the relationship should be bidirectional.
Bidirectional relationship does what I want but it seems to working only in Web. In android I can see the relationship name when I click add but after registering an entity I can not see the table like this:
In android, the relationships of a tracked entity instance can be found in the relationship screen on the TEI dashboard (where you add new relationships). There you will see the relationship name. The screenshot you are sharing is the search screen.