Castle & Cooke Inc., the troubled Honolulu-based company best known for its Dole products, said yesterday it plans to merge with Flexi-Van Corp., a container and chassis leasing company controlled by West Coast investor David H. Murdock.

The agreement, if it is approved by government regulators, shareholders of both companies and C&C's creditors, would appear to save C&C from bankruptcy.

The company is behind on its interest payments, and analysts said that without either a merger or an agreement with creditors to reschedule debt, C&C could be forced to declare bankruptcy by the end of the month.

Analysts said Murdock is interested in taking control of C&C because of the company's vast real estate holdings in California and Hawaii. A merger with C&C also would provide Murdock with the opportunity to shelter Flexi-Van income by netting it with C&C's substantial tax-losscarryforwards.

Flexi-Van, which has significantly reduced its debt recently, has strong cash flow that C&C badly needs to survive. Murdock is a well-known takeover artist who has successfully operated highly leveraged companies such as C&C in the past. Thus, the merger is expected to instill confidence in the company's prospects in C&C's bankers and other creditors, who will likely be more willing to reschedule C&C's debt.

Murdock, who is chairman and chief executive officer of Flexi-Van, will assume those positions at C&C, while R. D. Cooke, C&C's president and CEO, will become president and chief operating officer. After the merger C&C's board will consist of eight members of Flexi-Van's present board and six members of C&C's board.

Under the terms of the proposed merger agreement, each share of Flexi-Van common stock will be converted into 2.2 shares of C&C common and 1.1 shares of a new series of C&C voting convertible preferred stock.

Following the merger, current C&C stockholders will own about 55 percent of the merged company and Flexi-Van holders will own about 45 percent.

C&C, which has lost about $126 million in the last two years, embarked on an unsuccessful diversification program aimed at producing more balanced earnings. The company has moved into and out of industries such as pool sweeping and propellers that it knew little about.

C&C has given Flexi-Van an option to acquire up to 4.7 million shares of C&C common at $11 a share in cash, in addition to options, exercisable upon certain conditions, to acquire real property for up to $300 million in cash.

The merger would dilute the holdings of corporate takeover specialist Irwin L. Jacobs, who currently owns about 12 percent of C&C.