p.insurances will give you an array. Following should work. But be aware that there is going to be a performace hit when you have large number of policies and insurances
<% @policies.each do |p| %>
<%= p.num_policy %>
<% p.insurances.each do |insurance| %>
<% insurance.insurance_financing_details.each do |detail| %>
<%= detail.number %>
<% end %>
<% end %>
<% end %>