The White House did not respond to a request for comment.

Mr. Bloomberg’s transactionalism — and interest in winning whatever contest he is part of — also has echoes of Mr. Trump’s approach.

Both men built up their fortunes in the 1980s in New York — one a self-made billionaire who spent his money lavishly, the other born into privilege and often described as frugal — slapping their names on their companies and their products. Mr. Trump, a garrulous entertainer, was a contrast with Mr. Bloomberg, a dry-humored businessman whose Massachusetts accent has never totally faded.

By the time Mr. Bloomberg took office in 2002, Mr. Trump was not a builder in New York City so much as an entertainer, a brander and a licenser, and so had less business to conduct with Mr. Bloomberg than with two of the previous mayors, Mr. Giuliani and Ed Koch. Mr. Trump had a famously cantankerous relationship with Mr. Koch, but needed support from him and from Mr. Giuliani for his development projects.

Mr. Trump, after backing Democrats when Mr. Bloomberg was running for mayor as a Republican in 2001, became a full-throated supporter of the new mayor, as their daughters Ivanka Trump and Georgina Bloomberg appeared in a documentary about children of privilege, lamenting the complexity of their lives.

“We are friends, we were before her father was elected and it’s not going to change after,” Ms. Bloomberg wrote in an email in 2018, before her father made his presidential ambitions official. “I’m not a fan of him or his politics, but you don’t stop being friends with someone because of the actions of a family member.”

When Mr. Bloomberg began looking at a way to undo the city’s two-term limit so he could run again, a move that was successful but that infuriated a number of New Yorkers and some elected officials, Mr. Trump defended the idea.